diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 937cd4d5a2..ad9e4f251b 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -28,8 +28,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('
') .attr('id', 'emptyDialog') .appendTo('#page_content'); - $('#addChartForm').clone() - .attr('id', 'addChartDialog') + $('#addChartDialog') .appendTo('#page_content'); $('a.popupLink').click( function() { @@ -619,12 +618,12 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); $('#chartStatusVar').click(function () { $('input[name="chartTitle"]').val( - $('#chartSeries').find(':selected').text().replace(/_/, " ") + $('#chartSeries').find(':selected').text().replace(/_/g, " ") ); }); $('#chartSeries').change(function () { $('input[name="chartTitle"]').val( - $('#chartSeries').find(':selected').text().replace(/_/, " ") + $('#chartSeries').find(':selected').text().replace(/_/g, " ") ); }); } @@ -965,18 +964,19 @@ AJAX.registerOnload('server_status_monitor.js', function() { newChart = { title: $('input[name="chartTitle"]').val(), - nodes: [] + nodes: [], + series: [], + maxYLabel: 0 }; } var serie = { dataPoints: [{ type: 'statusvar', name: $('#variableInput').val() }], - name: $('#variableInput').val(), display: $('input[name="differentialValue"]').prop('checked') ? 'differential' : '' }; - if (serie.dataPoint == 'Processes') { - serie.dataType='proc'; + if (serie.dataPoints[0].name == 'Processes') { + serie.dataPoints[0].type ='proc'; } if ($('input[name="useDivisor"]').prop('checked')) { @@ -991,10 +991,12 @@ AJAX.registerOnload('server_status_monitor.js', function() { str += serie.valueDivisor ? (', ' + $.sprintf(PMA_messages['strDividedBy'], serie.valueDivisor)) : ''; str += serie.unit ? (', ' + PMA_messages['strUnit'] + ': ' + serie.unit) : ''; - $('#seriesPreview').append('- ' + serie.name + str + '