Added interface modules to db (to next relations with this interfaces)

This commit is contained in:
Arturo Gonzalez 2017-03-14 12:24:03 +01:00
parent f18f2e1068
commit 36fda7a23d
2 changed files with 0 additions and 22 deletions

View File

@ -407,10 +407,6 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
// Try to get the interface name // Try to get the interface name
if (preg_match ("/(.+)_ifOperStatus$/" , (string)$module['nombre'], $matches)) { if (preg_match ("/(.+)_ifOperStatus$/" , (string)$module['nombre'], $matches)) {
if ($matches[1]) { if ($matches[1]) {
$have_relations_a = db_get_value('id', 'tmodule_relationship', 'module_a', $module['id_agente_modulo']);
$have_relations_b = db_get_value('id', 'tmodule_relationship', 'module_b', $module['id_agente_modulo']);
if ($have_relations_a || $have_relations_b) {
$module['nombre'] = $matches[1]; $module['nombre'] = $matches[1];
// Save node parent information to define edges later // Save node parent information to define edges later
@ -420,7 +416,6 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
$nodes[$node_count] = $module; $nodes[$node_count] = $module;
} }
} }
}
else { else {
$have_relations_a = db_get_value('id', 'tmodule_relationship', 'module_a', $module['id_agente_modulo']); $have_relations_a = db_get_value('id', 'tmodule_relationship', 'module_a', $module['id_agente_modulo']);
$have_relations_b = db_get_value('id', 'tmodule_relationship', 'module_b', $module['id_agente_modulo']); $have_relations_b = db_get_value('id', 'tmodule_relationship', 'module_b', $module['id_agente_modulo']);

View File

@ -1877,23 +1877,6 @@ function add_interface_link_js () {
graph.links.push(temp_link); graph.links.push(temp_link);
$("#layer_graph_links_" + networkmap_id).remove();
$("#layer_graph_nodes_" + networkmap_id).remove();
window.layer_graph_links = window.layer_graph
.append("g")
.attr("id", "layer_graph_links_" + networkmap_id);
window.layer_graph_nodes = window.layer_graph
.append("g")
.attr("id", "layer_graph_nodes_" + networkmap_id);
force.nodes(graph.nodes)
.links(graph.links)
.start();
window.node = layer_graph_nodes.selectAll(".node");
window.link = layer_graph_links.selectAll(".link");
draw_elements_graph(); draw_elements_graph();
init_drag_and_drop(); init_drag_and_drop();
set_positions_graph(); set_positions_graph();