From 152312dee6f5c7e8a50e2a3e3677e134ed7b48e5 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 14 May 2014 11:44:43 +0000 Subject: [PATCH] 2014-05-14 Sergio Martin * extensions/realtime_graphs/ajax.php extensions/realtime_graphs/realtime_graphs.js godmode/agentes/module_manager_editor_network.php: Improvements in realtime graphs and snmp walk modal window git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9934 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/extensions/realtime_graphs/ajax.php | 1 - .../extensions/realtime_graphs/realtime_graphs.js | 12 ++++++++---- .../agentes/module_manager_editor_network.php | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8f7b797014..3c041b40a0 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-05-14 Sergio Martin + + * extensions/realtime_graphs/ajax.php + extensions/realtime_graphs/realtime_graphs.js + godmode/agentes/module_manager_editor_network.php: Improvements + in realtime graphs and snmp walk modal window + 2014-05-14 Sergio Martin * extensions/realtime_graphs/ajax.php: Improve the commands of diff --git a/pandora_console/extensions/realtime_graphs/ajax.php b/pandora_console/extensions/realtime_graphs/ajax.php index 6c1ba2e42e..e5881cbfed 100644 --- a/pandora_console/extensions/realtime_graphs/ajax.php +++ b/pandora_console/extensions/realtime_graphs/ajax.php @@ -68,7 +68,6 @@ if (empty($data)) { $data = 0; } -$graph_title .= ' (' . $refresh/1000 . ' ' . __('Seconds') . ')'; echo '{ "label": "' . $graph_title . '", "data": [["' . time() . '", ' . $data . ']] diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.js b/pandora_console/extensions/realtime_graphs/realtime_graphs.js index 6ff54eb15c..2b720a86e5 100644 --- a/pandora_console/extensions/realtime_graphs/realtime_graphs.js +++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.js @@ -31,6 +31,7 @@ var refresh = parseInt($('#refresh').val()); var incremental = $('#checkbox-incremental').is(':checked'); var incremental_base = 0; var last_inc = 0; +var to; refresh_graph(); @@ -86,14 +87,13 @@ function refresh_graph () { if (serie.data[0][1] < 0) { serie.data[0][1] = 0; } - } data[0].data.push(serie.data[0]); $.plot("#" + id, data, options); } }); - window.setTimeout(refresh_graph, refresh); + to = window.setTimeout(refresh_graph, refresh); } $('#graph').change(function() { @@ -101,7 +101,11 @@ $('#graph').change(function() { }); $('#refresh').change(function() { - //refresh_graph(); + var refresh = parseInt($('#refresh').val()); + + // Stop and start the Timeout + clearTimeout(to); + to = window.setTimeout(refresh_graph, refresh); }); // Show the SNMP browser window @@ -127,7 +131,7 @@ function snmpBrowserWindow () { opacity: 0.5, background: "black" }, - width: 730, + width: 780, height: 430 }); } diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index e181c47620..6fad59e2db 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -335,7 +335,7 @@ function snmpBrowserWindow () { opacity: 0.5, background: "black" }, - width: 730, + width: 780, height: 430 }); }