Author: vvalchev
Date: Wed Apr 14 13:59:53 2010
New Revision: 933957

URL: http://svn.apache.org/viewvc?rev=933957&view=rev
Log:
Fixed FELIX-2245 /Log Plugin - level sorting should be by level/
https://issues.apache.org/jira/browse/FELIX-2245

Modified:
    felix/trunk/webconsole/src/main/resources/res/ui/logs.js
    felix/trunk/webconsole/src/main/resources/templates/logs.html

Modified: felix/trunk/webconsole/src/main/resources/res/ui/logs.js
URL: 
http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/logs.js?rev=933957&r1=933956&r2=933957&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/logs.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/logs.js Wed Apr 14 
13:59:53 2010
@@ -55,7 +55,7 @@ function entryInternal( /* Element */ pa
                case 4: level = i18n.debug; break;
        }
     parent.appendChild( td( null, null, [ text( printDate(dataEntry.received) 
) ] ) );
-    parent.appendChild( td( null, null, [ text( level ) ] ) );    
+    parent.appendChild( td( null, { lvl:dataEntry.raw_level }, [ text( level ) 
] ) );    
     parent.appendChild( td( null, null, [ text( wordWrap(message) ) ] ) );
     parent.appendChild( td( null, null, [ text( wordWrap(service) ) ] ) );
     parent.appendChild( td( null, null, [ text( exception ) ] ) );
@@ -82,6 +82,14 @@ $(document).ready(function() {
            renderData(data);
        }, "json");
     });
+               // init tablesorte
+       $('#plugin_table').tablesorter({
+               textExtraction: function(node) {
+                       var _ = $(node);
+                       return _.attr('lvl') ? _.attr('lvl') : _.text();
+               }
+       });
+       
        logsElem  = $("#logs");
     logs2Elem = $("#logs2");
        tableElem = $("#plugin_table");

Modified: felix/trunk/webconsole/src/main/resources/templates/logs.html
URL: 
http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/templates/logs.html?rev=933957&r1=933956&r2=933957&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/templates/logs.html [UTF-8] 
(original)
+++ felix/trunk/webconsole/src/main/resources/templates/logs.html [UTF-8] Wed 
Apr 14 13:59:53 2010
@@ -32,7 +32,7 @@ var i18n = {
 </form>
 
 <div id="logs2">
-<table id="plugin_table" class="tablesorter nicetable">
+<table id="plugin_table" class="tablesorter nicetable noauto">
        <thead>
                <tr>
                        <th class="col_Received">${log.received}</th>


Reply via email to