From c9b2f3c69cb2e140ab204d8385c03c09157ba01c Mon Sep 17 00:00:00 2001 From: Tyron Madlener Date: Thu, 7 Jul 2011 13:07:37 +0300 Subject: [PATCH] Small improvements --- js/server_status.js | 24 ++++++++++++++++-------- server_status.php | 8 ++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/js/server_status.js b/js/server_status.js index 00b4cb59e7..843e93ef69 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -691,13 +691,16 @@ $(function() { width:'auto', height:'auto', buttons: { - 'Add chart to grid': function() { + 'Add chart to grid': function() { var type = $('input[name="chartType"]').find(':checked').val(); if(type == 'cpu' || type == 'memory') newChart = presetCharts[type + '-' + server_os]; - if(newChart.nodes.length == 0) return; + if(newChart.nodes.length == 0) { + alert('Please add at least one variable to the series'); + return; + } newChart.title = $('input[name="chartTitle"]').attr('value'); // Add a cloned object to the chart grid @@ -714,6 +717,9 @@ $(function() { $('#seriesPreview').html(''); } }); + + $('div#addChartDialog #seriesPreview').html(''+'None.'+''); + return false; }); @@ -723,8 +729,10 @@ $(function() { $(this).html('Resume Resume Monitor'); else { $(this).html('Pause Pause Monitor'); - if(chartGrid == null) + if(chartGrid == null) { initGrid(); + $('a[href="#popupLink"]').show(); + } } return false; }); @@ -734,7 +742,7 @@ $(function() { $dialog.dialog({ width: 585, - height: 415 + height: 'auto' }).find('img.ajaxIcon').show(); var loadLogVars = function(getvars) { @@ -787,14 +795,14 @@ $(function() { str += '- ' + 'Set log_output to TABLE' + '
'; if(logVars['general_log'] != 'ON') - str += '- ' + 'Enable general log' + '
'; + str += '- ' + 'Enable general_log' + '
'; else - str += '- ' + 'Disable general log' + '
'; + str += '- ' + 'Disable general_log' + '
'; if(logVars['slow_query_log'] != 'ON') - str += '- ' + 'Enable slow query log' + '
'; + str += '- ' + 'Enable slow_query_log' + '
'; else - str += '- ' + 'Disable slow query log' + '
'; + str += '- ' + 'Disable slow_query_log' + '
'; if(logVars['long_query_time'] > 2) str += '- ' + 'Set long_query_time to 1s' + '
'; diff --git a/server_status.php b/server_status.php index d0427360c5..9a2d18ecd7 100644 --- a/server_status.php +++ b/server_status.php @@ -594,7 +594,7 @@ echo __('Runtime Information');
Start Start Monitor - Settings Settings + Settings Settings Instructions Instructions
  • Add chart Add chart
  • @@ -620,9 +620,13 @@ echo __('Runtime Information'); Ok, you are good to go! Once you click 'Start monitor' your browser will refresh all displayed charts in a regular interval. You may add charts and change the refresh rate under 'Settings', or remove any chart using the cog icon on each respective chart. -

    When you get to see a sudden spike in activity, select the relevant timespan on any chart by holding down the +

    When you get to see a sudden spike in activity, select the relevant time span on any chart by holding down the left mouse button and panning over the chart. This will load statistics from the logs helping you find what caused the activity spike.

    +

    Please note: + Enabling the general_log may increase the server load by up to 5-15%. Also be aware that generating statistics out of the logs is a + very load intensive task, thus it is advisable to select only a small time span. +