Do not draw parent/child relationships in layer 2 maps.

This commit is contained in:
Ramon Novoa 2015-06-03 17:20:37 +02:00
parent cfd7590efc
commit 16c2e10a4f
1 changed files with 13 additions and 13 deletions

View File

@ -379,19 +379,6 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
} }
} }
// Addded the relationship of parents of agents
foreach ($agents as $agent) {
if ($agent['id_parent'] != "0" &&
array_key_exists($agent['id_parent'], $node_ref)) {
$parents[$node_ref[$agent['id_agente']]] = $node_ref[$agent['id_parent']];
}
else {
$orphans[$node_ref[$agent['id_agente']]] = 1;
}
}
// Drop the modules without a partner if l2_network is true // Drop the modules without a partner if l2_network is true
// and the snmp interfaces token is false // and the snmp interfaces token is false
if ($l2_network) { if ($l2_network) {
@ -420,6 +407,19 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
} }
} }
} }
} else {
// Addded the relationship of parents of agents
foreach ($agents as $agent) {
if ($agent['id_parent'] != "0" &&
array_key_exists($agent['id_parent'], $node_ref)) {
$parents[$node_ref[$agent['id_agente']]] = $node_ref[$agent['id_parent']];
}
else {
$orphans[$node_ref[$agent['id_agente']]] = 1;
}
}
} }
// Create void statistics array // Create void statistics array