Removed module tipe filter in networkmaps.

This commit is contained in:
Arturo Gonzalez 2017-03-08 16:09:08 +01:00
parent 7d6aae01cd
commit 6548443c82
1 changed files with 68 additions and 79 deletions

View File

@ -528,13 +528,10 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
$relations = array();
foreach ($relations as $key => $relation) {
$module_a = $relation['module_a'];
$module_a_type = modules_get_agentmodule_type($module_a);
$agent_a = modules_get_agentmodule_agent($module_a);
$module_b = $relation['module_b'];
$module_b_type = modules_get_agentmodule_type($module_b);
$agent_b = modules_get_agentmodule_agent($module_b);
if ($module_a_type == 18 && $module_b_type == 18) {
if (isset($modules_node_ref[$module_a]) &&
isset($modules_node_ref[$module_b])) {
$graph .= networkmap_create_edge(
@ -553,9 +550,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
'topology',
$id_networkmap);
}
}
elseif ($module_a_type == 6 && $module_b_type == 6) {
if (isset($node_ref[$agent_a]) &&
elseif (isset($node_ref[$agent_a]) &&
isset($node_ref[$agent_b])) {
$graph .= networkmap_create_edge(
$node_ref[$agent_a],
@ -573,10 +568,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
'topology',
$id_networkmap);
}
}
elseif ($module_a_type == 6 && $module_b_type == 18) {
if (isset($node_ref[$agent_a]) &&
elseif (isset($node_ref[$agent_a]) &&
isset($modules_node_ref[$module_b])) {
$graph .= networkmap_create_edge(
$node_ref[$agent_a],
@ -594,9 +586,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
'topology',
$id_networkmap);
}
}
elseif ($module_b_type == 6 && $module_a_type == 18) {
if (isset($node_ref[$agent_b]) &&
elseif (isset($node_ref[$agent_b]) &&
isset($modules_node_ref[$module_a])) {
$graph .= networkmap_create_edge(
$node_ref[$agent_b],
@ -615,7 +605,6 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
$id_networkmap);
}
}
}
// Close graph
$graph .= networkmap_close_graph ();