diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 490aea6eaa..6b7dd8b62b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-11-27 Sergio Martin + + * include/functions_reporting.php + operation/reporting/reporting_viewer.php: Fix some bugs of + reports on metaconsole + 2012-11-27 Juan Manuel Ramon * include/functions_graph.php: Fixed progress_bar in metaconsole. diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 5415ca2b66..f5b9c4df14 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2493,7 +2493,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $data_sla = reporting_get_agentmodule_sla_array ($sla['id_agent_module'], $content['period'], $sla['sla_min'], $sla['sla_max'], $report['datetime'], $content, $content['time_from'], $content['time_to']); - + + if($data_sla == false) { + $data_sla = array(); + } + //Get the sla_value in % and store it on $sla_value $data_total = 0; $data_pass = 0; @@ -2516,8 +2520,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f } } - $sla_value = ($data_pass / $data_total) * 100; - + if($data_total == 0) { + $sla_value = 0; + } + else { + $sla_value = ($data_pass / $data_total) * 100; + } + //Do not show right modules if 'only_display_wrong' is active if ($content['only_display_wrong'] == 1 && $sla_value >= $sla['sla_limit']) continue; diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 369b20677c..c2ed5859f1 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -65,10 +65,7 @@ $enable_init_date = get_parameter('enable_init_date', 0); // Standard header -// Build link for sort actions: metaconsole and normal console -$variable_link = ui_get_full_url(false); - -$url = $variable_link . "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time"; +$url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time"; $options['setup'] = "" . html_print_image ("images/setup.png", true, array ("title" => __('Setup')))