diff --git a/js/server_status.js b/js/server_status.js index 10c29bd9e1..d2bf61a47c 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -1,6 +1,7 @@ $(function() { var textFilter=null; var alertFilter = false; + var odd_row=false; // Filter options are invisible for disabled js users $('#serverstatusvars fieldset').css('display',''); @@ -25,12 +26,23 @@ $(function() { }); function filterVariables() { + odd_row=false; $('#serverstatusvariables th.name').each(function() { + if((textFilter==null || textFilter.exec($(this).text())) - && (!alertFilter || $(this).next().find('span.attention').length>0)) + && (!alertFilter || $(this).next().find('span.attention').length>0)) { + odd_row = !odd_row; $(this).parent().css('display',''); - else + if(odd_row) { + $(this).parent().addClass('odd'); + $(this).parent().removeClass('even'); + } else { + $(this).parent().addClass('even'); + $(this).parent().removeClass('odd'); + } + } else { $(this).parent().css('display','none'); + } }); } }); \ No newline at end of file diff --git a/server_status.php b/server_status.php index 5437385c80..4dc54d33fc 100644 --- a/server_status.php +++ b/server_status.php @@ -26,6 +26,7 @@ require_once './libraries/chart.lib.php'; */ if (isset($_REQUEST["query_chart_ajax"])) { $com_vars = PMA_DBI_fetch_result("SHOW GLOBAL STATUS LIKE 'Com_%'", 0, 1); + arsort($com_vars); // remove all zero values from the end // variable empty for Drizzle if ($com_vars) {