From 0832d9613a974735a92fe125880996e8a5b04d0d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 10 Jan 2023 16:40:53 +0100 Subject: [PATCH 1/2] #10052 Fixed fictional color --- pandora_console/include/class/NetworkMap.class.php | 2 +- pandora_console/operation/agentes/pandora_networkmap.view.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index ccfbf102c1..470a0deb52 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -1672,7 +1672,7 @@ class NetworkMap if (isset($source_data['color'])) { $item['color'] = $source_data['color']; } else { - if (empty($node['status']) && empty($node['id_module']) && !empty($node['style']['id_networkmap'])) { + if (empty($node['style']['id_networkmap']) === false) { $status_aux = get_status_color_networkmap_fictional_point($node['style']['id_networkmap']); $item['color'] = $status_aux; } else { diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 6d118d6e10..e35ba182a1 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -881,7 +881,11 @@ if (is_ajax() === true) { $shape = get_parameter('shape', 0); $radious = (int) get_parameter('radious', 20); $color = get_parameter('color', 0); + $networkmap = (int) get_parameter('networkmap', 0); + if (empty($networkmap) === false) { + $color = get_status_color_networkmap_fictional_point($networkmap); + } $return = []; $return['correct'] = false; From baa799007e412271025eb155bfb9a865bab420f5 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 12 Jan 2023 16:42:29 +0100 Subject: [PATCH 2/2] #10052 Fixed fictional color 2 --- pandora_console/include/functions_networkmap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index f5dd4cfe96..f8e020d066 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -3393,7 +3393,7 @@ function get_status_color_networkmap_fictional_point($id_networkmap, $parent='') $exit = false; foreach ($agents as $agent) { - if ($agent['source_data'] == -1) { + if ($agent['source_data'] == -1 || $agent['type'] == 2) { continue; }