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,92 +528,81 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
$relations = array(); $relations = array();
foreach ($relations as $key => $relation) { foreach ($relations as $key => $relation) {
$module_a = $relation['module_a']; $module_a = $relation['module_a'];
$module_a_type = modules_get_agentmodule_type($module_a);
$agent_a = modules_get_agentmodule_agent($module_a); $agent_a = modules_get_agentmodule_agent($module_a);
$module_b = $relation['module_b']; $module_b = $relation['module_b'];
$module_b_type = modules_get_agentmodule_type($module_b);
$agent_b = modules_get_agentmodule_agent($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]) &&
if (isset($modules_node_ref[$module_a]) && isset($modules_node_ref[$module_b])) {
isset($modules_node_ref[$module_b])) { $graph .= networkmap_create_edge(
$graph .= networkmap_create_edge( $modules_node_ref[$module_a],
$modules_node_ref[$module_a], $modules_node_ref[$module_b],
$modules_node_ref[$module_b], $layout,
$layout, $nooverlap,
$nooverlap, $pure,
$pure, $zoom,
$zoom, $ranksep,
$ranksep, $simple,
$simple, $regen,
$regen, $font_size,
$font_size, $group,
$group, 'operation/agentes/networkmap',
'operation/agentes/networkmap', 'topology',
'topology', $id_networkmap);
$id_networkmap);
}
} }
elseif ($module_a_type == 6 && $module_b_type == 6) { elseif (isset($node_ref[$agent_a]) &&
if (isset($node_ref[$agent_a]) && isset($node_ref[$agent_b])) {
isset($node_ref[$agent_b])) { $graph .= networkmap_create_edge(
$graph .= networkmap_create_edge( $node_ref[$agent_a],
$node_ref[$agent_a], $node_ref[$agent_b],
$node_ref[$agent_b], $layout,
$layout, $nooverlap,
$nooverlap, $pure,
$pure, $zoom,
$zoom, $ranksep,
$ranksep, $simple,
$simple, $regen,
$regen, $font_size,
$font_size, $group,
$group, 'operation/agentes/networkmap',
'operation/agentes/networkmap', 'topology',
'topology', $id_networkmap);
$id_networkmap);
}
} }
elseif ($module_a_type == 6 && $module_b_type == 18) { elseif (isset($node_ref[$agent_a]) &&
if (isset($node_ref[$agent_a]) && isset($modules_node_ref[$module_b])) {
isset($modules_node_ref[$module_b])) { $graph .= networkmap_create_edge(
$graph .= networkmap_create_edge( $node_ref[$agent_a],
$node_ref[$agent_a], $modules_node_ref[$module_b],
$modules_node_ref[$module_b], $layout,
$layout, $nooverlap,
$nooverlap, $pure,
$pure, $zoom,
$zoom, $ranksep,
$ranksep, $simple,
$simple, $regen,
$regen, $font_size,
$font_size, $group,
$group, 'operation/agentes/networkmap',
'operation/agentes/networkmap', 'topology',
'topology', $id_networkmap);
$id_networkmap);
}
} }
elseif ($module_b_type == 6 && $module_a_type == 18) { elseif (isset($node_ref[$agent_b]) &&
if (isset($node_ref[$agent_b]) && isset($modules_node_ref[$module_a])) {
isset($modules_node_ref[$module_a])) { $graph .= networkmap_create_edge(
$graph .= networkmap_create_edge( $node_ref[$agent_b],
$node_ref[$agent_b], $modules_node_ref[$module_a],
$modules_node_ref[$module_a], $layout,
$layout, $nooverlap,
$nooverlap, $pure,
$pure, $zoom,
$zoom, $ranksep,
$ranksep, $simple,
$simple, $regen,
$regen, $font_size,
$font_size, $group,
$group, 'operation/agentes/networkmap',
'operation/agentes/networkmap', 'topology',
'topology', $id_networkmap);
$id_networkmap);
}
} }
} }