diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index 3b215e8af8..3844b01a1e 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -1547,7 +1547,9 @@ MapController.prototype.events_for_nodes = function(id_node) { if (d3.event.defaultPrevented) return; - self.tooltip_map_create(self, this); + if ((d['type'] == ITEM_TYPE_AGENT_NETWORKMAP) || (d['type'] == ITEM_TYPE_MODULE_NETWORKMAP)) { + self.tooltip_map_create(self, this); + } }) .on("contextmenu", d3.contextMenu(node_menu, function(node) { self._last_event = "contextmenu"; diff --git a/pandora_console/include/javascript/map/NetworkmapController.js b/pandora_console/include/javascript/map/NetworkmapController.js index 54d4999479..50db7a7e2f 100644 --- a/pandora_console/include/javascript/map/NetworkmapController.js +++ b/pandora_console/include/javascript/map/NetworkmapController.js @@ -70,6 +70,7 @@ NetworkmapController.prototype.init_map = function() { } }); } + if (filter['show_modules']) { if (filter['show_module_group']) { var arrow_GM = self.get_arrow_GM(edge['to'], edge['from']); @@ -90,7 +91,9 @@ NetworkmapController.prototype.init_map = function() { var arrow_AM = self.get_arrow_AM(edge['to'], edge['from']); if (arrow_AM !== null) { if (!self.exists_arrow(clean_arrows, arrow_AM)) { - clean_arrows.push(arrow_AM); + if (!self.fake_arrow_AM(arrow_AM)) { + clean_arrows.push(arrow_AM); + } } } } @@ -134,6 +137,22 @@ NetworkmapController.prototype.init_map = function() { MapController.prototype.init_map.call(this); }; +/** +* Function fake_arrow_AM +* Return bool +* This function returns if the AM arrow is a fake arrow +*/ +NetworkmapController.prototype.fake_arrow_AM = function(arrow_AM) { + var agent_to = parseInt(arrow_AM['to']['id_agent']); + var agent_from = parseInt(arrow_AM['from']['id_agent']); + if (agent_to == agent_from) { + return false; + } + else { + return true; + } +} + /** * Function filter_only_agents * Return void @@ -2274,7 +2293,7 @@ NetworkmapController.prototype.editNode = function(target) { $("#edit_node_dialog_" + node_id).append(data); $("#edit_node_dialog_" + node_id).dialog({ autoOpen: false, - closeOnEscape: true + closeOnEscape: true }); $("#edit_node_dialog_" + node_id).dialog("open");