From 74753918c381ee7558f930b867386a82329e828e Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Fri, 27 Oct 2017 12:43:46 +0200 Subject: [PATCH] Added function to update link to other map --- pandora_console/include/functions_pandora_networkmap.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 0bbb4dd124..a16455462b 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -212,6 +212,7 @@ function networkmap_process_networkmap($id = 0) { $style['width'] = $node['width']; $style['height'] = $node['height']; $style['label'] = $node['text']; + $style['id_networkmap'] = $node['networkmap']; $nodes_and_relations['nodes'][$index]['style'] = json_encode($style); $index++; @@ -398,6 +399,13 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area if (isset($node['id_map'])) { $item['map_id'] = $node['id_map']; } + + if (!isset($node['style']['id_networkmap']) || $node['style']['id_networkmap'] == '' || $node['style']['id_networkmap'] == 0) { + $item['networkmap_id'] = 0; + } + else { + $item['networkmap_id'] = $node['style']['id_networkmap']; + } $count++;