2011-08-17 Dario Rodriguez <dario.rodriguez@artica.es>
* include/functions_networkmap.php: Fixed a bug with topology map git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4755 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
544c2ad120
commit
2cf5d35f17
|
@ -1,3 +1,8 @@
|
||||||
|
2011-08-17 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
|
* include/functions_networkmap.php: Fixed a bug with topology map
|
||||||
|
|
||||||
|
|
||||||
2011-08-17 Javier Lanz <javier.lanz@artica.es>
|
2011-08-17 Javier Lanz <javier.lanz@artica.es>
|
||||||
|
|
||||||
* operation/snmpconsole/snmp_view.php: Fixed an style icon small bug
|
* operation/snmpconsole/snmp_view.php: Fixed an style icon small bug
|
||||||
|
|
|
@ -72,11 +72,21 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0, $font_
|
||||||
// Parse agents
|
// Parse agents
|
||||||
$nodes = array ();
|
$nodes = array ();
|
||||||
$node_count = 1;
|
$node_count = 1;
|
||||||
|
|
||||||
|
// Add node
|
||||||
|
$node_ref = array();
|
||||||
|
foreach ($agents as $agent) {
|
||||||
|
// Add node
|
||||||
|
$node_ref[$agent['id_agente']] = $node_count;
|
||||||
|
$node_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$node_count = 1;
|
||||||
|
|
||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
// Save node parent information to define edges later
|
// Save node parent information to define edges later
|
||||||
if ($agent['id_parent'] != "0") {
|
if ($agent['id_parent'] != "0") {
|
||||||
$parents[$node_count] = $agent['id_parent'];
|
$parents[$node_count] = $node_ref[$agent['id_parent']];
|
||||||
} else {
|
} else {
|
||||||
$orphans[$node_count] = 1;
|
$orphans[$node_count] = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue