From 4808e4ae9735263afd1440d4ab9e2f29c9dc7ac2 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Fri, 5 Apr 2019 16:43:36 +0200 Subject: [PATCH] fixed errors map ipam Former-commit-id: 9a1e5460ab40d22135edc75f2adf186f8d56f3d4 --- pandora_console/include/class/NetworkMap.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index dba51499f4..c1061fe120 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -1616,6 +1616,16 @@ class NetworkMap if (is_array($node['style']) === false) { $node['style'] = json_decode($node['style'], true); + + // Add styles. + if (isset($source_data['style']) === true + && is_array($source_data['style']) === true + ) { + $node['style'] = array_merge( + $node['style'], + $source_data['style'] + ); + } } // Propagate styles. @@ -2722,6 +2732,7 @@ class NetworkMap } $this->nodesJS = $this->nodesToJS($nodes); + $output .= 'networkmap.nodes = ('.json_encode($this->nodesJS).");\n"; // Clean.