From ba03b4ecc01aac018484a0bbd5a6ee83f8ba298f Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 23 Aug 2010 10:46:11 +0000 Subject: [PATCH] 2010-08-23 Sergio Martin * include/functions_reporting.php include/fgraph.php: Fixed the max and min values on the graphs git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3168 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/fgraph.php | 4 ++-- pandora_console/include/functions_reporting.php | 6 +----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 143483a8fd..b8648a1b6b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-08-23 Sergio Martin + + * include/functions_reporting.php + include/fgraph.php: Fixed the max and min values + on the graphs + 2010-08-23 Junichi Satoh * godmode/alert/alert_list.php, godmode/alert/alert_list.list.php: diff --git a/pandora_console/include/fgraph.php b/pandora_console/include/fgraph.php index ae0529311c..d94f9f1feb 100644 --- a/pandora_console/include/fgraph.php +++ b/pandora_console/include/fgraph.php @@ -1474,7 +1474,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events, } // Flash chart - $caption = __('Max. Value') . ': ' . $min_value . ' ' . __('Avg. Value') . ': ' . $avg_value . ' ' . __('Min. Value') . ': ' . $min_value; + $caption = __('Max. Value') . ': ' . $max_value . ' ' . __('Avg. Value') . ': ' . $avg_value . ' ' . __('Min. Value') . ': ' . $min_value; if (! $graphic_type) { return fs_module_chart ($chart, $width, $height, $avg_only, $resolution / 10, $time_format, $show_events, $show_alerts, $caption); } @@ -1936,7 +1936,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events, } // Flash chart - $caption = __('Max. Value') . ': ' . $min_value . ' ' . __('Avg. Value') . ': ' . $avg_value . ' ' . __('Min. Value') . ': ' . $min_value; + $caption = __('Max. Value') . ': ' . $max_value . ' ' . __('Avg. Value') . ': ' . $avg_value . ' ' . __('Min. Value') . ': ' . $min_value; if (! $graphic_type) { return fs_module_chart ($chart, $width, $height, $avg_only, $resolution / 10, $time_format, $show_events, $show_alerts, $caption); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 7e7e918971..21741a22f0 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -254,11 +254,7 @@ function get_agentmodule_data_min ($id_agent_module, $period, $date = 0) { } // Set initial conditions - if ($uncompressed_module || $interval_data[0]['utimestamp'] == $datelimit) { - $min = $interval_data[0]['datos']; - } else { - $min = 0; - } + $min = $interval_data[0]['datos']; foreach ($interval_data as $data) { if ($data['datos'] < $min) {