From b40f0012db580a0b617a1e04f3e02688d4c370be Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 5 Nov 2019 14:34:43 +0100 Subject: [PATCH] fix bug in meta visual console: group item not retrieving values properly --- .../include/functions_visual_map.php | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 1c6afb9eed..417b6dc587 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1900,6 +1900,8 @@ function visual_map_print_item( echo ''; } } else { + $is_meta = is_metaconsole(); + $agents_critical = agents_get_agents( [ 'disabled' => 0, @@ -1908,7 +1910,10 @@ function visual_map_print_item( ], ['COUNT(*) as total'], 'AR', - false + false, + false, + 0, + $is_meta ); $agents_warning = agents_get_agents( [ @@ -1918,7 +1923,10 @@ function visual_map_print_item( ], ['COUNT(*) as total'], 'AR', - false + false, + false, + 0, + $is_meta ); $agents_unknown = agents_get_agents( [ @@ -1928,7 +1936,10 @@ function visual_map_print_item( ], ['COUNT(*) as total'], 'AR', - false + false, + false, + 0, + $is_meta ); $agents_ok = agents_get_agents( [ @@ -1938,7 +1949,10 @@ function visual_map_print_item( ], ['COUNT(*) as total'], 'AR', - false + false, + false, + 0, + $is_meta ); $total_agents = ($agents_critical[0]['total'] + $agents_warning[0]['total'] + $agents_unknown[0]['total'] + $agents_ok[0]['total']); $stat_agent_ok = ($agents_ok[0]['total'] / $total_agents * 100);