From 561589423d072d4f5d54431d96e506e629ddec69 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 27 Jan 2022 12:55:42 +0100 Subject: [PATCH] Fixed color of fictional node --- pandora_console/include/class/NetworkMap.class.php | 13 +++++++++---- pandora_console/include/functions_networkmap.php | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index f7b9ddec79..f562f8110c 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -1672,10 +1672,15 @@ class NetworkMap if (isset($source_data['color'])) { $item['color'] = $source_data['color']; } else { - $item['color'] = self::getColorByStatus( - $node['status'], - (bool) $node['id_module'] - ); + if (empty($node['status']) && empty($node['id_module']) && !empty($node['style']['id_networkmap'])) { + $status_aux = get_status_color_networkmap_fictional_point($node['style']['id_networkmap']); + $item['color'] = $status_aux; + } else { + $item['color'] = self::getColorByStatus( + $node['status'], + (bool) $node['id_module'] + ); + } } break; } diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index e50ef59abe..e8ee2cf347 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -3280,7 +3280,10 @@ function get_status_color_networkmap_fictional_point($id_networkmap, $parent='') if ((int) $id_networkmap !== 0) { $agents = db_get_all_rows_filter( 'titem', - ['id_map' => $id_networkmap] + [ + 'id_map' => $id_networkmap, + 'deleted' => 0, + ] ); if ((bool) $agents === false) {