From 0b758a6b0c88d716d1b80d5ff71a1c07d0b89601 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 10 Oct 2016 09:43:43 +0200 Subject: [PATCH] New networkmaps in progress... (Fixed weird nodes) --- .../include/functions_pandora_networkmap.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 9d80b1896d..6f8ada3d0e 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -564,9 +564,6 @@ function networkmap_links_to_js_links($relations, $nodes_graph) { } $agent = $relation['id_parent_source_data']; } - } - else if (($relation['parent_type'] == 3) && ($relation['child_type'] == 3)) { - } else { $agent = $relation['id_parent_source_data']; @@ -582,6 +579,14 @@ function networkmap_links_to_js_links($relations, $nodes_graph) { $item['source'] = $node['id']; } } + else if ($node['id_agent'] == 0 && $node['text'] == "") { + if ($node['id'] == $relation['id_parent']) { + $item['target'] = $node['id']; + } + else if($node['id'] == $relation['id_child']) { + $item['source'] = $node['id']; + } + } else { if ($node['id_agent'] == $agent) { $item['target'] = $node['id'];