diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a289d834dc..bffca5dcd7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-10-04 Sancho Lerena + + * include/functions_reporting.php: Fixed AGAIN the prooblem + with tactical view, users with several groups or ALL group + doesnt work fine. + 2012-10-03 Vanessa Gil * include/functions_api.php: Changed function create diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index cbefb6d544..c2fb5f8149 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -917,28 +917,28 @@ function reporting_get_group_stats ($id_group = 0) { } // Get unknown agents by using the status code in modules. - - $data["agents_unknown"] = groups_agent_unknown ($group_array); - + + $data["agents_unknown"] += groups_agent_unknown ($group_array); + // Get monitor NOT INIT, except disabled AND async modules - - $data["monitor_not_init"] = groups_monitor_not_init ($group_array); - + + $data["monitor_not_init"] += groups_monitor_not_init ($group_array); + // Get monitor OK, except disabled and non-init - $data["monitor_ok"] = groups_monitor_ok ($group_array); - + $data["monitor_ok"] += groups_monitor_ok ($group_array); + // Get monitor CRITICAL, except disabled and non-init - - $data["monitor_critical"] = groups_monitor_critical ($group_array); + + $data["monitor_critical"] += groups_monitor_critical ($group_array); // Get monitor WARNING, except disabled and non-init - $data["monitor_warning"] = groups_monitor_warning ($group_array); - + $data["monitor_warning"] += groups_monitor_warning ($group_array); + // Get monitor UNKNOWN, except disabled and non-init - $data["monitor_unknown"] = groups_monitor_unknown ($group_array); + $data["monitor_unknown"] += groups_monitor_unknown ($group_array); // Get alerts configured, except disabled @@ -959,9 +959,14 @@ function reporting_get_group_stats ($id_group = 0) { // Get total count of monitors for this group, except disabled. - $data["monitor_checks"] += $data["monitor_not_init"] + $data["monitor_unknown"] + $data["monitor_warning"] + $data["monitor_critical"] + $data["monitor_ok"]; + $data["monitor_checks"] = $data["monitor_not_init"] + $data["monitor_unknown"] + $data["monitor_warning"] + $data["monitor_critical"] + $data["monitor_ok"]; } + + // Get total count of monitors for this group, except disabled. + + $data["monitor_checks"] = $data["monitor_not_init"] + $data["monitor_unknown"] + $data["monitor_warning"] + $data["monitor_critical"] + $data["monitor_ok"]; + /* Monitor health (percentage) Data health (percentage) @@ -4949,4 +4954,4 @@ function reporting_template_graphs_get_user ($id_user = 0, $only_names = false, return $templates; } -?> \ No newline at end of file +?>