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) {