Fixed negative id to pandorafms node in networkmaps.
This commit is contained in:
parent
cdd2363912
commit
fe23e81481
|
@ -576,12 +576,6 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
||||||
else {
|
else {
|
||||||
$agent = $relation['id_parent_source_data'];
|
$agent = $relation['id_parent_source_data'];
|
||||||
$agent2 = $relation['id_child_source_data'];
|
$agent2 = $relation['id_child_source_data'];
|
||||||
if ($agent == 0) {
|
|
||||||
$agent = -1;
|
|
||||||
}
|
|
||||||
if ($agent2 == 0) {
|
|
||||||
$agent = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($nodes_graph as $node) {
|
foreach ($nodes_graph as $node) {
|
||||||
|
@ -829,7 +823,7 @@ function networkmap_loadfile($id = 0, $file = '',
|
||||||
$data['type'] = '';
|
$data['type'] = '';
|
||||||
if (preg_match('/Pandora FMS/', $line) != 0) {
|
if (preg_match('/Pandora FMS/', $line) != 0) {
|
||||||
$data['text'] = 'Pandora FMS';
|
$data['text'] = 'Pandora FMS';
|
||||||
$data['id_agent'] = -1;
|
$data['id_agent'] = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$data['type'] = $ids[$node_id]['type'];
|
$data['type'] = $ids[$node_id]['type'];
|
||||||
|
|
Loading…
Reference in New Issue