From 7bfe69980295284bc2d4e4f86e7f34b601efbebe Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 23 Sep 2021 17:01:22 +0200 Subject: [PATCH] Fixes minor issues --- .../extras/delete_files/delete_files.txt | 6 +- .../include/ajax/map_enterprise.ajax.php | 102 + .../include/class/NetworkMap.class.php | 110 +- .../include/javascript/SimpleMapController.js | 459 ++++ .../functions_pandora_networkmap.js | 2000 ++++++++--------- .../javascript/tooltipster.bundle.min.js | 2 + .../lib/Dashboard/Widgets/network_map.php | 2 +- .../include/styles/tooltipster.bundle.min.css | 1 + 8 files changed, 1487 insertions(+), 1195 deletions(-) create mode 100644 pandora_console/include/ajax/map_enterprise.ajax.php create mode 100644 pandora_console/include/javascript/SimpleMapController.js create mode 100644 pandora_console/include/javascript/tooltipster.bundle.min.js create mode 100644 pandora_console/include/styles/tooltipster.bundle.min.css diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt index fc1dc7874b..8bfef52f3f 100644 --- a/pandora_console/extras/delete_files/delete_files.txt +++ b/pandora_console/extras/delete_files/delete_files.txt @@ -107,4 +107,8 @@ enterprise/godmode/alerts/alert_events_list.php enterprise/godmode/alerts/alert_events_rules.php enterprise/godmode/alerts/configure_alert_rule.php enterprise/include/functions_networkmap.php -enterprise/operation/agentes/pandora_networkmap.view.php \ No newline at end of file +enterprise/operation/agentes/pandora_networkmap.view.php +enterprise/include/ajax/map_enterprise.ajax.php +enterprise/include/javascript/SimpleMapController.js +enterprise/include/javascript/tooltipster.bundle.min.js +enterprise/include/styles/tooltipster.bundle.min.css \ No newline at end of file diff --git a/pandora_console/include/ajax/map_enterprise.ajax.php b/pandora_console/include/ajax/map_enterprise.ajax.php new file mode 100644 index 0000000000..8d888e4a23 --- /dev/null +++ b/pandora_console/include/ajax/map_enterprise.ajax.php @@ -0,0 +1,102 @@ + 0) { + metaconsole_connect(null, $node); + } +} + +if ($networkmap) { + $networkmap_id = get_parameter('networkmap_id', 0); + $x_offset = get_parameter('x_offset', 0); + $y_offset = get_parameter('y_offset', 0); + $zoom_dash = get_parameter('zoom_dash', 0.5); + + // Dashboard mode. + $ignore_acl = (bool) get_parameter('ignore_acl', 0); + + $networkmap = db_get_row_filter('tmap', ['id' => $networkmap_id]); + + if ($ignore_acl === false) { + // ACL for the network map. + $networkmap_read = check_acl($config['id_user'], $networkmap['id_group'], 'MR'); + $networkmap_write = check_acl($config['id_user'], $networkmap['id_group'], 'MW'); + $networkmap_manage = check_acl($config['id_user'], $networkmap['id_group'], 'MM'); + + if (!$networkmap_read && !$networkmap_write && !$networkmap_manage) { + db_pandora_audit( + 'ACL Violation', + 'Trying to access networkmap' + ); + include 'general/noaccess.php'; + + if ($node > 0) { + metaconsole_restore_db(); + } + + return; + } + } + + ob_start(); + + if ($networkmap['generation_method'] == LAYOUT_RADIAL_DYNAMIC) { + $data['name'] = ''.$networkmap['name'].''; + global $id_networkmap; + $id_networkmap = $networkmap['id']; + $tab = 'radial_dynamic'; + + include_once 'operation/agentes/networkmap.dinamic.php'; + } else { + $map = new NetworkMap( + [ + 'id_map' => $networkmap_id, + 'widget' => 1, + 'pure' => 1, + 'no_popup' => 1, + 'map_options' => [ + 'x_offs' => $x_offset, + 'y_offs' => $y_offset, + 'z_dash' => $zoom_dash, + ], + + + ] + ); + + $map->printMap(false, $ignore_acl); + } + + $return = ob_get_clean(); + + echo $return; + + + if ($node > 0) { + metaconsole_restore_db(); + } + + return; +} + + +if ($node > 0) { + metaconsole_restore_db(); +} diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index 58150d6522..daa4cb9717 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -30,7 +30,6 @@ global $config; require_once $config['homedir'].'/include/functions_networkmap.php'; -enterprise_include_once('include/functions_networkmap.php'); enterprise_include_once('include/functions_discovery.php'); // Avoid node overlapping. @@ -723,13 +722,7 @@ class NetworkMap } if ($this->idMap !== false) { - if (enterprise_installed()) { - // Enterprise environment: LOAD. - $this->nodes = enterprise_hook( - 'get_nodes_from_db', - [$this->idMap] - ); - } + $this->nodes = get_nodes_from_db($this->idMap); } return $this->nodes; @@ -762,12 +755,7 @@ class NetworkMap } if ($this->idMap !== false) { - if (enterprise_installed()) { - $this->relations = enterprise_hook( - 'get_relations_from_db', - [$this->idMap] - ); - } + $this->relations = get_relations_from_db($this->idMap); } return $this->relations; @@ -786,12 +774,9 @@ class NetworkMap // Calculate. // Search. - if (enterprise_installed() && $this->idTask) { + if ($this->idTask) { // Network map, based on discovery task. - return enterprise_hook( - 'get_discovery_agents', - [$this->idTask] - ); + return get_discovery_agents($this->idTask); } if ($this->network) { @@ -1101,18 +1086,14 @@ class NetworkMap $relations = $this->relations; // Generate if there's no data in DB about nodes or relations. - if (empty($nodes) && empty($relations)) { + if (empty($nodes) === true && empty($relations) === true) { $this->generateNetworkMap(); return; } - $graph = enterprise_hook( - 'networkmap_load_map', - [$this] - ); + $graph = networkmap_load_map($this); - if ($graph === ENTERPRISE_NOT_HOOK) { - // Method not available, regenerate. + if (empty($graph) === true) { $this->generateNetworkMap(); return; } @@ -2607,15 +2588,7 @@ class NetworkMap // Save data. if ($this->idMap > 0 && (isset($this->map['__simulated']) === false)) { - if (enterprise_installed()) { - $graph = enterprise_hook( - 'save_generate_nodes', - [ - $this->idMap, - $graph, - ] - ); - } + $graph = save_generate_nodes($this->idMap, $graph); db_process_sql_update( 'tmap', @@ -2733,7 +2706,6 @@ class NetworkMap $output .= 'var networkmap_refresh_time = 1000 * '.$networkmap['source_period'].";\n"; $output .= 'var networkmap_center = [ '.$networkmap['center_x'].', '.$networkmap['center_y']."];\n"; $output .= 'var networkmap_dimensions = [ '.$networkmap['width'].', '.$networkmap['height']."];\n"; - $output .= 'var enterprise_installed = '.((int) enterprise_installed()).";\n"; $output .= 'var networkmap_write = '.$networkmap_write.";\n"; $output .= 'var node_radius = '.$networkmap['filter']['node_radius'].";\n"; $output .= 'var networkmap_holding_area_dimensions = '.json_encode($networkmap['filter']['holding_area']).";\n"; @@ -2883,22 +2855,14 @@ class NetworkMap public function loadAdvancedInterface() { $list_networkmaps = get_networkmaps($this->idMap); - if (empty($list_networkmaps)) { + hd($list_networkmaps); + if (empty($list_networkmaps) === true) { $list_networkmaps = []; } $id = 'dialog_node_edit'; - if (!enterprise_installed()) { - $id = 'open_version_dialog'; - $output = ''; - } - $output .= ''; @@ -3340,8 +3300,7 @@ class NetworkMap { $output = ''; - if (enterprise_installed() - && $this->useTooltipster + if ($this->useTooltipster ) { $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= ''."\n"; $output .= '
'), + functionReady: function() { + $("#node_" + node["id"]).tooltipster("open"); + $(".tooltipster-content").css("background", "#FFF"); + $(".tooltipster-content").css("color", "#000"); + + var params = self.custom_params; + + // Add data node click. + params.node_data = node; + + params["id_agent"] = node["id_agent"]; + jQuery.ajax({ + data: params, + dataType: "html", + type: "POST", + url: self.homedir + "/ajax.php", + success: function(data) { + $(".tooltipster-content").css("min-height", "330px"); + $(".tooltipster-content").css("max-height", "500px"); + $("#node_" + node["id"]).tooltipster("content", data); + } + }); + } + }); + } + }); +}; + +SimpleMapController.prototype.paint_arrows = function() { + var self = this; + + if (self.arrows != null) { + self._viewport + .selectAll(".arrow") + .data(self.arrows) + .enter() + .append("g") + .attr("class", "arrow") + .attr("to", function(d) { + return d["dest"]; + }) + .attr("from", function(d) { + return d["orig"]; + }) + .attr("style", "fill: rgb(50, 50, 128);") + .append("line") + .attr("stroke", "#373737") + .attr("stroke-width", 3) + .attr("x1", function(d) { + return self.center_x + self.getFirstPoint(d["orig"], "x"); + }) + .attr("y1", function(d) { + return self.center_y + self.getFirstPoint(d["orig"], "y"); + }) + .attr("x2", function(d) { + return self.center_x + self.getSecondPoint(d["dest"], "x"); + }) + .attr("y2", function(d) { + return self.center_y + self.getSecondPoint(d["dest"], "y"); + }); + } +}; + +SimpleMapController.prototype.getFirstPoint = function(orig, coord) { + var self = this; + var point = 0; + + self.nodes.forEach(function(node) { + if (node["id"] === orig) { + if (coord == "x") { + point = parseFloat(node["x"]); + return; + } else { + point = parseFloat(node["y"]) + node["radius"]; + return; + } + } + }); + + return point; +}; + +SimpleMapController.prototype.getSecondPoint = function(dest, coord) { + var self = this; + var point = 0; + + self.nodes.forEach(function(node) { + if (node["id"] === dest) { + if (coord == "x") { + point = parseFloat(node["x"]); + return; + } else { + point = parseFloat(node["y"]) + node["radius"]; + return; + } + } + }); + + return point; +}; diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 10d175f2ff..ad99c6001b 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -194,399 +194,391 @@ function delete_link( target_module_id, id_link ) { - if (enterprise_installed) { - var params = []; - params.push("delete_link=1"); - params.push("networkmap_id=" + networkmap_id); - params.push("source_id=" + source_id); - params.push("source_module_id=" + source_module_id); - params.push("target_id=" + target_id); - params.push("target_module_id=" + target_module_id); - params.push("id_link=" + id_link); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - var found = -1; - jQuery.each(graph.links, function(i, element) { - if (element.id_db == id_link) { - found = i; - } - }); - if (found != -1) { - graph.links.splice(found, 1); + var params = []; + params.push("delete_link=1"); + params.push("networkmap_id=" + networkmap_id); + params.push("source_id=" + source_id); + params.push("source_module_id=" + source_module_id); + params.push("target_id=" + target_id); + params.push("target_module_id=" + target_module_id); + params.push("id_link=" + id_link); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + var found = -1; + jQuery.each(graph.links, function(i, element) { + if (element.id_db == id_link) { + found = i; } - - $("#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(); - init_drag_and_drop(); - set_positions_graph(); + }); + if (found != -1) { + graph.links.splice(found, 1); } - $("#dialog_node_edit").dialog("close"); + + $("#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(); + init_drag_and_drop(); + set_positions_graph(); } - }); - } + $("#dialog_node_edit").dialog("close"); + } + }); } function update_fictional_node(id_db_node) { - if (enterprise_installed) { - var name = $("input[name='edit_name_fictional_node']").val(); - var networkmap_to_link = $("#edit_networkmap_to_link").val(); + var name = $("input[name='edit_name_fictional_node']").val(); + var networkmap_to_link = $("#edit_networkmap_to_link").val(); - var params = []; - params.push("update_fictional_node=1"); - params.push("networkmap_id=" + networkmap_id); - params.push("node_id=" + id_db_node); - params.push("name=" + name); - params.push("networkmap_to_link=" + networkmap_to_link); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + var params = []; + params.push("update_fictional_node=1"); + params.push("networkmap_id=" + networkmap_id); + params.push("node_id=" + id_db_node); + params.push("name=" + name); + params.push("networkmap_to_link=" + networkmap_to_link); + params.push("page=operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - $("#dialog_node_edit").dialog("close"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + $("#dialog_node_edit").dialog("close"); - jQuery.each(graph.nodes, function(i, element) { - if (element.id_db == id_db_node) { - graph.nodes[i].text = name; - graph.nodes[i].networkmap_id = networkmap_to_link; + jQuery.each(graph.nodes, function(i, element) { + if (element.id_db == id_db_node) { + graph.nodes[i].text = name; + graph.nodes[i].networkmap_id = networkmap_to_link; - $("#id_node_" + i + networkmap_id + " title").html(name); - $("#id_node_" + i + networkmap_id + " tspan").html( - ellipsize(name, 30) - ); - } - }); + $("#id_node_" + i + networkmap_id + " title").html(name); + $("#id_node_" + i + networkmap_id + " tspan").html( + ellipsize(name, 30) + ); + } + }); - draw_elements_graph(); - set_positions_graph(); - } + draw_elements_graph(); + set_positions_graph(); } - }); - } + } + }); } function update_node_name(id_db_node) { - if (enterprise_installed) { - var name = $("input[name='edit_name_node']").val(); + var name = $("input[name='edit_name_node']").val(); - var params = []; - params.push("update_node_name=1"); - params.push("networkmap_id=" + networkmap_id); - params.push("node_id=" + id_db_node); - params.push("name=" + name); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + var params = []; + params.push("update_node_name=1"); + params.push("networkmap_id=" + networkmap_id); + params.push("node_id=" + id_db_node); + params.push("name=" + name); + params.push("page=operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - $("#dialog_node_edit").dialog("close"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + $("#dialog_node_edit").dialog("close"); - jQuery.each(graph.nodes, function(i, element) { - if (element.id_db == id_db_node) { - graph.nodes[i]["text"] = data["text"]; - graph.nodes[i]["raw_text"] = data["raw_text"]; + jQuery.each(graph.nodes, function(i, element) { + if (element.id_db == id_db_node) { + graph.nodes[i]["text"] = data["text"]; + graph.nodes[i]["raw_text"] = data["raw_text"]; - $("#id_node_" + i + networkmap_id + " title").html( - data["raw_text"] - ); - $("#id_node_" + i + networkmap_id + " tspan").html( - ellipsize(data["raw_text"], 30) - ); - } - }); + $("#id_node_" + i + networkmap_id + " title").html( + data["raw_text"] + ); + $("#id_node_" + i + networkmap_id + " tspan").html( + ellipsize(data["raw_text"], 30) + ); + } + }); - draw_elements_graph(); - set_positions_graph(); - } + draw_elements_graph(); + set_positions_graph(); } - }); - } + } + }); } function change_shape(id_db_node) { - if (enterprise_installed) { - var shape = $("select[name='shape']").val(); + var shape = $("select[name='shape']").val(); - var params = []; - params.push("change_shape=1"); - params.push("networkmap_id=" + networkmap_id); - params.push("id=" + id_db_node); - params.push("shape=" + shape); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + var params = []; + params.push("change_shape=1"); + params.push("networkmap_id=" + networkmap_id); + params.push("id=" + id_db_node); + params.push("shape=" + shape); + params.push("page=operation/agentes/pandora_networkmap.view"); - $("#shape_icon_correct").css("display", "none"); - $("#shape_icon_fail").css("display", "none"); - $("#shape_icon_in_progress").css("display", ""); + $("#shape_icon_correct").css("display", "none"); + $("#shape_icon_fail").css("display", "none"); + $("#shape_icon_in_progress").css("display", ""); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - $("#shape_icon_in_progress").css("display", "none"); - if (data["correct"]) { - $("#shape_icon_correct").css("display", ""); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + $("#shape_icon_in_progress").css("display", "none"); + if (data["correct"]) { + $("#shape_icon_correct").css("display", ""); - var count = graph.nodes.length; + var count = graph.nodes.length; - jQuery.each(graph.nodes, function(i, element) { - if (element.id_db == id_db_node) { - graph.nodes[i].shape = shape; + jQuery.each(graph.nodes, function(i, element) { + if (element.id_db == id_db_node) { + graph.nodes[i].shape = shape; - $("#id_node_" + element.id + networkmap_id + " rect").remove(); - $("#id_node_" + element.id + networkmap_id + " circle").remove(); - $("#id_node_" + element.id + networkmap_id + " image").remove(); + $("#id_node_" + element.id + networkmap_id + " rect").remove(); + $("#id_node_" + element.id + networkmap_id + " circle").remove(); + $("#id_node_" + element.id + networkmap_id + " image").remove(); - if (shape == "circle") { - d3.select("#id_node_" + element.id + networkmap_id) - .insert("circle", "title") - .attr("r", node_radius) - .attr("class", "node_shape node_shape_circle") - .style("fill", function(d) { - return d.color; - }) - .classed("dragable_node", true) //own dragable - .on("mouseover", function(d) { - myMouseoverCircleFunction(d.id); - }) - .on("mouseout", function(d) { - myMouseoutCircleFunction(d.id); - }) - .on("click", selected_node) - .on("dblclick", function(d) { - if (d.type == 3) { - move_to_networkmap(d); - } else { - edit_node(d, true); - } - }) - .on("contextmenu", function(d) { - show_menu("node", d); - }); + if (shape == "circle") { + d3.select("#id_node_" + element.id + networkmap_id) + .insert("circle", "title") + .attr("r", node_radius) + .attr("class", "node_shape node_shape_circle") + .style("fill", function(d) { + return d.color; + }) + .classed("dragable_node", true) //own dragable + .on("mouseover", function(d) { + myMouseoverCircleFunction(d.id); + }) + .on("mouseout", function(d) { + myMouseoutCircleFunction(d.id); + }) + .on("click", selected_node) + .on("dblclick", function(d) { + if (d.type == 3) { + move_to_networkmap(d); + } else { + edit_node(d, true); + } + }) + .on("contextmenu", function(d) { + show_menu("node", d); + }); - d3.select("#id_node_" + element.id + networkmap_id) - .append("image") - .attr("class", "node_image") - .attr("xlink:href", function(d) { - return d.image_url; - }) - .attr("x", function(d) { - return d.x - d.image_width / 2; - }) - .attr("y", function(d) { - return d.y - d.image_height / 2; - }) - .attr("width", function(d) { - return node_radius / 0.8; - }) - .attr("height", function(d) { - return node_radius / 0.8; - }) - .attr("node_id", function(d) { - return d.id; - }) - .attr("id", "image2995") - .classed("dragable_node", true) //own dragable - .on("mouseover", function(d) { - myMouseoverCircleFunction(d.id); - }) - .on("mouseout", function(d) { - myMouseoutCircleFunction(d.id); - }) - .on("click", selected_node) - .on("dblclick", function(d) { - if (d.type == 3) { - move_to_networkmap(d); - } else { - edit_node(d, true); - } - }) - .on("contextmenu", function(d) { - show_menu("node", d); - }); - } else if (shape == "square") { - d3.select("#id_node_" + element.id + networkmap_id) - .insert("rect", "title") - .attr("width", node_radius * 2) - .attr("height", node_radius * 2) - .attr("class", "node_shape node_shape_square") - .style("fill", function(d) { - return d.color; - }) - .classed("dragable_node", true) //own dragable - .on("mouseover", function(d) { - myMouseoverSquareFunction(d.id); - }) - .on("mouseout", function(d) { - myMouseoutSquareFunction(d.id); - }) - .on("click", selected_node) - .on("dblclick", function(d) { - if (d.type == 3) { - move_to_networkmap(d); - } else { - edit_node(d, true); - } - }) - .on("contextmenu", function(d) { - show_menu("node", d); - }); + d3.select("#id_node_" + element.id + networkmap_id) + .append("image") + .attr("class", "node_image") + .attr("xlink:href", function(d) { + return d.image_url; + }) + .attr("x", function(d) { + return d.x - d.image_width / 2; + }) + .attr("y", function(d) { + return d.y - d.image_height / 2; + }) + .attr("width", function(d) { + return node_radius / 0.8; + }) + .attr("height", function(d) { + return node_radius / 0.8; + }) + .attr("node_id", function(d) { + return d.id; + }) + .attr("id", "image2995") + .classed("dragable_node", true) //own dragable + .on("mouseover", function(d) { + myMouseoverCircleFunction(d.id); + }) + .on("mouseout", function(d) { + myMouseoutCircleFunction(d.id); + }) + .on("click", selected_node) + .on("dblclick", function(d) { + if (d.type == 3) { + move_to_networkmap(d); + } else { + edit_node(d, true); + } + }) + .on("contextmenu", function(d) { + show_menu("node", d); + }); + } else if (shape == "square") { + d3.select("#id_node_" + element.id + networkmap_id) + .insert("rect", "title") + .attr("width", node_radius * 2) + .attr("height", node_radius * 2) + .attr("class", "node_shape node_shape_square") + .style("fill", function(d) { + return d.color; + }) + .classed("dragable_node", true) //own dragable + .on("mouseover", function(d) { + myMouseoverSquareFunction(d.id); + }) + .on("mouseout", function(d) { + myMouseoutSquareFunction(d.id); + }) + .on("click", selected_node) + .on("dblclick", function(d) { + if (d.type == 3) { + move_to_networkmap(d); + } else { + edit_node(d, true); + } + }) + .on("contextmenu", function(d) { + show_menu("node", d); + }); - d3.select("#id_node_" + element.id + networkmap_id) - .append("image") - .attr("class", "node_image") - .attr("xlink:href", function(d) { - return d.image_url; - }) - .attr("x", function(d) { - return d.x - d.image_width / 2; - }) - .attr("y", function(d) { - return d.y - d.image_height / 2; - }) - .attr("width", function(d) { - return node_radius / 0.8; - }) - .attr("height", function(d) { - return node_radius / 0.8; - }) - .attr("node_id", function(d) { - return d.id; - }) - .attr("id", "image2995") - .classed("dragable_node", true) //own dragable - .on("mouseover", function(d) { - myMouseoverSquareFunction(d.id); - }) - .on("mouseout", function(d) { - myMouseoutSquareFunction(d.id); - }) - .on("click", selected_node) - .on("dblclick", function(d) { - if (d.type == 3) { - move_to_networkmap(d); - } else { - edit_node(d, true); - } - }) - .on("contextmenu", function(d) { - show_menu("node", d); - }); - } else if (shape == "rhombus") { - d3.select("#id_node_" + element.id + networkmap_id) - .insert("rect", "title") - .attr("transform", "") - .attr("width", node_radius * 1.5) - .attr("height", node_radius * 1.5) - .attr("class", "node_shape node_shape_rhombus") - .style("fill", function(d) { - return d.color; - }) - .classed("dragable_node", true) //own dragable - .on("mouseover", function(d) { - myMouseoverRhombusFunction(d.id); - }) - .on("mouseout", function(d) { - myMouseoutRhombusFunction(d.id); - }) - .on("click", selected_node) - .on("dblclick", function(d) { - if (d.type == 3) { - move_to_networkmap(d); - } else { - edit_node(d, true); - } - }) - .on("contextmenu", function(d) { - show_menu("node", d); - }); + d3.select("#id_node_" + element.id + networkmap_id) + .append("image") + .attr("class", "node_image") + .attr("xlink:href", function(d) { + return d.image_url; + }) + .attr("x", function(d) { + return d.x - d.image_width / 2; + }) + .attr("y", function(d) { + return d.y - d.image_height / 2; + }) + .attr("width", function(d) { + return node_radius / 0.8; + }) + .attr("height", function(d) { + return node_radius / 0.8; + }) + .attr("node_id", function(d) { + return d.id; + }) + .attr("id", "image2995") + .classed("dragable_node", true) //own dragable + .on("mouseover", function(d) { + myMouseoverSquareFunction(d.id); + }) + .on("mouseout", function(d) { + myMouseoutSquareFunction(d.id); + }) + .on("click", selected_node) + .on("dblclick", function(d) { + if (d.type == 3) { + move_to_networkmap(d); + } else { + edit_node(d, true); + } + }) + .on("contextmenu", function(d) { + show_menu("node", d); + }); + } else if (shape == "rhombus") { + d3.select("#id_node_" + element.id + networkmap_id) + .insert("rect", "title") + .attr("transform", "") + .attr("width", node_radius * 1.5) + .attr("height", node_radius * 1.5) + .attr("class", "node_shape node_shape_rhombus") + .style("fill", function(d) { + return d.color; + }) + .classed("dragable_node", true) //own dragable + .on("mouseover", function(d) { + myMouseoverRhombusFunction(d.id); + }) + .on("mouseout", function(d) { + myMouseoutRhombusFunction(d.id); + }) + .on("click", selected_node) + .on("dblclick", function(d) { + if (d.type == 3) { + move_to_networkmap(d); + } else { + edit_node(d, true); + } + }) + .on("contextmenu", function(d) { + show_menu("node", d); + }); - d3.select("#id_node_" + element.id + networkmap_id) - .append("image") - .attr("class", "node_image") - .attr("xlink:href", function(d) { - return d.image_url; - }) - .attr("x", function(d) { - return d.x - d.image_width / 2; - }) - .attr("y", function(d) { - return d.y - d.image_height / 2; - }) - .attr("width", function(d) { - return node_radius / 0.8; - }) - .attr("height", function(d) { - return node_radius / 0.8; - }) - .attr("node_id", function(d) { - return d.id; - }) - .attr("id", "image2995") - .classed("dragable_node", true) //own dragable - .on("mouseover", function(d) { - myMouseoverRhombusFunction(d.id); - }) - .on("mouseout", function(d) { - myMouseoutRhombusFunction(d.id); - }) - .on("click", selected_node) - .on("dblclick", function(d) { - if (d.type == 3) { - move_to_networkmap(d); - } else { - edit_node(d, true); - } - }) - .on("contextmenu", function(d) { - show_menu("node", d); - }); - } + d3.select("#id_node_" + element.id + networkmap_id) + .append("image") + .attr("class", "node_image") + .attr("xlink:href", function(d) { + return d.image_url; + }) + .attr("x", function(d) { + return d.x - d.image_width / 2; + }) + .attr("y", function(d) { + return d.y - d.image_height / 2; + }) + .attr("width", function(d) { + return node_radius / 0.8; + }) + .attr("height", function(d) { + return node_radius / 0.8; + }) + .attr("node_id", function(d) { + return d.id; + }) + .attr("id", "image2995") + .classed("dragable_node", true) //own dragable + .on("mouseover", function(d) { + myMouseoverRhombusFunction(d.id); + }) + .on("mouseout", function(d) { + myMouseoutRhombusFunction(d.id); + }) + .on("click", selected_node) + .on("dblclick", function(d) { + if (d.type == 3) { + move_to_networkmap(d); + } else { + edit_node(d, true); + } + }) + .on("contextmenu", function(d) { + show_menu("node", d); + }); } + } - count = count - 1; - if (count == 0) { - draw_elements_graph(); - set_positions_graph(); - } - }); - } else { - $("#shape_icon_fail").css("display", ""); - } + count = count - 1; + if (count == 0) { + draw_elements_graph(); + set_positions_graph(); + } + }); + } else { + $("#shape_icon_fail").css("display", ""); } - }); - } + } + }); } function update_link(row_index, id_link) { @@ -623,7 +615,7 @@ function update_link(row_index, id_link) { params.push("interface_target=" + interface_target); params.push("source_text=" + text_source_interface); params.push("target_text=" + text_target_interface); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + params.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params.join("&"), @@ -750,7 +742,7 @@ function move_to_networkmap(node) { params.push("get_networkmap_from_fictional=1"); params.push("id=" + node.id_db); params.push("id_map=" + node.map_id); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + params.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params.join("&"), @@ -771,6 +763,7 @@ function move_to_networkmap(node) { } function edit_node(data_node, dblClick) { + console.log("PATATA"); var flag_edit_node = true; var edit_node = null; @@ -825,11 +818,7 @@ function edit_node(data_node, dblClick) { var params = []; params.push("get_agent_info=1"); params.push("id_agent=" + node_selected["id_agent"]); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - - if (!enterprise_installed) { - params.push("page=operation/agentes/pandora_networkmap.view"); - } + params.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params.join("&"), @@ -914,7 +903,7 @@ function get_interface_data_to_table(node_selected, selected_links) { var params = []; params.push("get_interface_info=1"); params.push("id_agent=" + node_selected["id_agent"]); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + params.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params.join("&"), dataType: "json", @@ -999,7 +988,7 @@ function load_interfaces(selected_links) { params3.push("get_intefaces=1"); params3.push("id_agent_target=" + link_each.target.id_agent); params3.push("id_agent_source=" + link_each.source.id_agent); - params3.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + params3.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params3.join("&"), @@ -1162,132 +1151,72 @@ function add_agent_node(agents) { var x = (click_menu_position_svg[0] - translation[0]) / scale; var y = (click_menu_position_svg[1] - translation[1]) / scale; - if (enterprise_installed) { - jQuery.each(id_agents, function(i, id_agent) { - x = x + i * 20; - y = y + i * 20; + jQuery.each(id_agents, function(i, id_agent) { + x = x + i * 20; + y = y + i * 20; - var params = []; - params.push("add_agent=1"); - params.push("id=" + networkmap_id); - params.push("id_agent=" + id_agent); - params.push("x=" + x); - params.push("y=" + y); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - $("#agent_name").val(""); - $("#dialog_node_add").dialog("close"); + var params = []; + params.push("add_agent=1"); + params.push("id=" + networkmap_id); + params.push("id_agent=" + id_agent); + params.push("x=" + x); + params.push("y=" + y); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + $("#agent_name").val(""); + $("#dialog_node_add").dialog("close"); - const new_id = - Math.max.apply( - Math, - graph.nodes.map(function(o) { - return o.id; - }) - ) + 1; + const new_id = + Math.max.apply( + Math, + graph.nodes.map(function(o) { + return o.id; + }) + ) + 1; - var temp_node = {}; - temp_node["id"] = new_id; - temp_node["id_db"] = data["id_node"]; - temp_node["id_agent"] = data["id_agent"]; - temp_node["id_module"] = ""; - temp_node["px"] = data["x"]; - temp_node["py"] = data["y"]; - temp_node["x"] = data["x"]; - temp_node["y"] = data["y"]; - temp_node["z"] = 0; - temp_node["fixed"] = true; - temp_node["type"] = 0; - temp_node["color"] = data["status"]; - temp_node["shape"] = data["shape"]; - temp_node["text"] = data["text"]; - temp_node["image_url"] = data["image_url"]; - temp_node["image_width"] = data["width"]; - temp_node["image_height"] = data["height"]; - temp_node["map_id"] = data["map_id"]; - temp_node["state"] = data["state"]; + var temp_node = {}; + temp_node["id"] = new_id; + temp_node["id_db"] = data["id_node"]; + temp_node["id_agent"] = data["id_agent"]; + temp_node["id_module"] = ""; + temp_node["px"] = data["x"]; + temp_node["py"] = data["y"]; + temp_node["x"] = data["x"]; + temp_node["y"] = data["y"]; + temp_node["z"] = 0; + temp_node["fixed"] = true; + temp_node["type"] = 0; + temp_node["color"] = data["status"]; + temp_node["shape"] = data["shape"]; + temp_node["text"] = data["text"]; + temp_node["image_url"] = data["image_url"]; + temp_node["image_width"] = data["width"]; + temp_node["image_height"] = data["height"]; + temp_node["map_id"] = data["map_id"]; + temp_node["state"] = data["state"]; - graph.nodes.push(temp_node); + graph.nodes.push(temp_node); - /*jQuery.each(data['rel'], function(i, relation) { - var temp_link = {}; - if (i == 0) { - var found = 0; - temp_link['source'] = graph.nodes[temp_node['id']]; - jQuery.each(graph.nodes, function(j, element) { - if (element.id_agent == relation['id_agent_end']) { - found = j; - } - }); - temp_link['target'] = graph.nodes[found]; - } - else { - var found = 0; - temp_link['target'] = graph.nodes[temp_node['id']]; - jQuery.each(graph.nodes, function(j, element) { - if (element.id_agent == relation['id_agent_start']) { - found = j; - } - }); - temp_link['source'] = graph.nodes[found]; - } - temp_link['id_db'] = String(relation['id_db']); - temp_link['id_agent_end'] = String(relation['id_agent_end']); - temp_link['id_agent_start'] = String(relation['id_agent_start']); - temp_link['id_module_end'] = relation['id_module_end']; - temp_link['id_module_start'] = relation['id_module_start']; - temp_link['source_in_db'] = String(relation['source_in_db']); - temp_link['target_in_db'] = String(relation['target_in_db']); - temp_link['arrow_end'] = relation['arrow_end']; - temp_link['arrow_start'] = relation['arrow_start']; - temp_link['status_end'] = relation['status_end']; - temp_link['status_start'] = relation['status_start']; - temp_link['text_end'] = relation['text_end']; - temp_link['text_start'] = relation['text_start']; - - graph.links.push(temp_link); - });*/ - - draw_elements_graph(); - init_drag_and_drop(); - set_positions_graph(); - } else { - $("#error_red").show(); - $("#error_red").attr( - "data-title", - "The agent is already added on the networkmap" - ); - $("#error_red").attr("data-use_title_for_force_title", "1"); - } + draw_elements_graph(); + init_drag_and_drop(); + set_positions_graph(); + } else { + $("#error_red").show(); + $("#error_red").attr( + "data-title", + "The agent is already added on the networkmap" + ); + $("#error_red").attr("data-use_title_for_force_title", "1"); } - }); + } }); - } else { - $("#agent_name").val(""); - $("#dialog_node_add").dialog("close"); - - var temp_node = {}; - temp_node["id"] = graph.nodes.length; - temp_node["id_db"] = graph.nodes.length; - temp_node["id_agent"] = id_agent; - temp_node["id_module"] = ""; - temp_node["px"] = x; - temp_node["py"] = y; - temp_node["x"] = x; - temp_node["y"] = y; - temp_node["z"] = 0; - temp_node["fixed"] = true; - temp_node["type"] = 0; - temp_node["map_id"] = networkmap_id; - - graph.nodes.push(temp_node); - } + }); } function hide_labels() { @@ -1361,61 +1290,59 @@ function function_close_minimap() { } function delete_nodes() { - if (enterprise_installed) { - var selection = d3.selectAll(".node_selected"); - selection.each(function(d) { - //Avoid to delete pandora node center - if (d.id_agent == 0) { - return; - } - - var params = []; - params.push("id=" + d.id_db); - params.push("delete_node=1"); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - var found = -1; - do { - found = -1; - jQuery.each(graph.links, function(i, element) { - if (element.target.id == d.id) { - found = i; - } - }); - if (found != -1) graph.links.splice(found, 1); - } while (found != -1); - - do { - found = -1; - jQuery.each(graph.links, function(i, element) { - if (element.source.id == d.id) { - found = i; - } - }); - if (found != -1) graph.links.splice(found, 1); - } while (found != -1); + var selection = d3.selectAll(".node_selected"); + selection.each(function(d) { + //Avoid to delete pandora node center + if (d.id_agent == 0) { + return; + } + var params = []; + params.push("id=" + d.id_db); + params.push("delete_node=1"); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + var found = -1; + do { found = -1; - jQuery.each(graph.nodes, function(i, element) { - if (element.id == d.id) { + jQuery.each(graph.links, function(i, element) { + if (element.target.id == d.id) { found = i; } }); - graph.nodes.splice(found, 1); + if (found != -1) graph.links.splice(found, 1); + } while (found != -1); - draw_elements_graph(); - set_positions_graph(); - } + do { + found = -1; + jQuery.each(graph.links, function(i, element) { + if (element.source.id == d.id) { + found = i; + } + }); + if (found != -1) graph.links.splice(found, 1); + } while (found != -1); + + found = -1; + jQuery.each(graph.nodes, function(i, element) { + if (element.id == d.id) { + found = i; + } + }); + graph.nodes.splice(found, 1); + + draw_elements_graph(); + set_positions_graph(); } - }); + } }); - } + }); } function zoom(manual) { @@ -1700,83 +1627,80 @@ function clear_selection() { } function update_networkmap() { - if (enterprise_installed) { - node.each(function(d) { - // Do not update Pandora FMS node. - if (d.type != 2) { - var params = []; - params.push("update_node_color=1"); - params.push("id=" + d.id_db); - params.push( - "page=enterprise/operation/agentes/pandora_networkmap.view" - ); + node.each(function(d) { + // Do not update Pandora FMS node. + if (d.type != 2) { + var params = []; + params.push("update_node_color=1"); + params.push("id=" + d.id_db); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + d3.select("#id_node_" + d.id + networkmap_id + " .node_shape").style( + "fill", + data["color"] + ); + } + }); + } + }); + + link.each(function(d) { + if (d.id_module_start != 0 || d.id_module_end != 0) { + if (d.id_module_start && d.id_module_start > 0) { + let params = []; + params.push("module_get_status=1"); + params.push("page=operation/agentes/pandora_networkmap.view"); + params.push("id=" + d.id_module_start); jQuery.ajax({ data: params.join("&"), dataType: "json", type: "POST", url: window.base_url_homedir + "/ajax.php", success: function(data) { - d3.select( - "#id_node_" + d.id + networkmap_id + " .node_shape" - ).style("fill", data["color"]); + d3.selectAll(".id_module_start_" + d.id_module_start).attr( + "marker-start", + function(d) { + if (typeof module_color_status[data.status] == "undefined") + return "url(#interface_start)"; + else return "url(#interface_start_" + data.status + ")"; + } + ); } }); } - }); - link.each(function(d) { - if (d.id_module_start != 0 || d.id_module_end != 0) { - if (d.id_module_start && d.id_module_start > 0) { - var params = []; - params.push("module_get_status=1"); - params.push("page=operation/agentes/pandora_networkmap.view"); - params.push("id=" + d.id_module_start); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - d3.selectAll(".id_module_start_" + d.id_module_start).attr( - "marker-start", - function(d) { - if (typeof module_color_status[data.status] == "undefined") - return "url(#interface_start)"; - else return "url(#interface_start_" + data.status + ")"; - } - ); - } - }); - } - - if (d.id_module_end && d.id_module_end > 0) { - var params = []; - params.push("module_get_status=1"); - params.push("page=operation/agentes/pandora_networkmap.view"); - params.push("id=" + d.id_module_end); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - d3.selectAll(".id_module_end_" + d.id_module_end).attr( - "marker-end", - function(d) { - if (typeof module_color_status[data.status] == "undefined") - return "url(#interface_end)"; - else return "url(#interface_end_" + data.status + ")"; - } - ); - } - }); - } + if (d.id_module_end && d.id_module_end > 0) { + let params = []; + params.push("module_get_status=1"); + params.push("page=operation/agentes/pandora_networkmap.view"); + params.push("id=" + d.id_module_end); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + d3.selectAll(".id_module_end_" + d.id_module_end).attr( + "marker-end", + function(d) { + if (typeof module_color_status[data.status] == "undefined") + return "url(#interface_end)"; + else return "url(#interface_end_" + data.status + ")"; + } + ); + } + }); } - }); + } + }); - draw_minimap(); - } + draw_minimap(); } //////////////////////////////////////////////////////////////////////// @@ -1902,13 +1826,7 @@ function show_menu(item, data) { items_list["details"] = { name: edit_menu, icon: "details", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { edit_node(data, false); } @@ -1917,14 +1835,10 @@ function show_menu(item, data) { name: interface_link_add, icon: "interface_link_children", disabled: function() { - if (enterprise_installed) { - if (data.type == 3 || data.type == 2) { - return true; - } else { - return false; - } - } else { + if (data.type == 3 || data.type == 2) { return true; + } else { + return false; } }, callback: function(key, options) { @@ -1949,13 +1863,7 @@ function show_menu(item, data) { items_list["children"] = { name: set_as_children_menu, icon: "children", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { var selection = d3.selectAll(".node_children"); selection.each(function(d) { @@ -1987,14 +1895,10 @@ function show_menu(item, data) { name: set_parent_link, icon: "interface_link_parent", disabled: function() { - if (enterprise_installed) { - if (data.type == 3 || data.type == 2) { - return true; - } else { - return false; - } - } else { + if (data.type == 3 || data.type == 2) { return true; + } else { + return false; } }, callback: function(key, options) { @@ -2013,14 +1917,10 @@ function show_menu(item, data) { name: abort_relationship_interface, icon: "interface_link_cancel", disabled: function() { - if (enterprise_installed) { - if (data.type == 3) { - return true; - } else { - return false; - } - } else { + if (data.type == 3) { return true; + } else { + return false; } }, callback: function(key, options) { @@ -2039,13 +1939,7 @@ function show_menu(item, data) { items_list["set_parent"] = { name: set_parent_menu, icon: "set_parent", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { var selection = d3.selectAll(".node_selected"); selection = selection[0]; @@ -2061,13 +1955,7 @@ function show_menu(item, data) { items_list["cancel_set_parent"] = { name: abort_relationship_menu, icon: "cancel_set_parent", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { cancel_set_parent(); } @@ -2079,13 +1967,7 @@ function show_menu(item, data) { items_list["delete"] = { name: delete_menu, icon: "delete", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { delete_nodes(); } @@ -2107,13 +1989,8 @@ function show_menu(item, data) { name: add_node_menu, icon: "add_node", disabled: function() { - if (enterprise_installed) { - // Check if user can write network maps. - if (networkmap_write) { - return false; - } else { - return true; - } + if (networkmap_write) { + return false; } else { return true; } @@ -2140,13 +2017,7 @@ function show_menu(item, data) { items_list["refresh"] = { name: refresh_menu, icon: "refresh", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { update_networkmap(); } @@ -2154,13 +2025,7 @@ function show_menu(item, data) { items_list["refresh_holding_area"] = { name: refresh_holding_area_menu, icon: "refresh_holding_area", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { refresh_holding_area(); } @@ -2169,13 +2034,8 @@ function show_menu(item, data) { name: restart_map_menu, icon: "restart_map", disabled: function() { - if (enterprise_installed) { - // Check if user can write network maps. - if (networkmap_write) { - return false; - } else { - return true; - } + if (networkmap_write) { + return false; } else { return true; } @@ -2189,13 +2049,7 @@ function show_menu(item, data) { items_list["cancel_set_parent"] = { name: abort_relationship_menu, icon: "cancel_set_parent", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { cancel_set_parent(); } @@ -2206,13 +2060,7 @@ function show_menu(item, data) { items_list["cancel_set_parent_interface"] = { name: abort_relationship_interface, icon: "cancel_set_parent", - disabled: function() { - if (enterprise_installed) { - return false; - } else { - return true; - } - }, + disabled: false, callback: function(key, options) { cancel_set_parent_interface(); } @@ -2281,7 +2129,7 @@ function add_interface_link(data_parent) { params.push("id=" + networkmap_id); params.push("child=" + child_data.id_db); params.push("parent=" + data_parent.id_db); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + params.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params.join("&"), @@ -2343,7 +2191,7 @@ function add_interface_link_js() { jQuery.ajax({ data: { - page: "enterprise/operation/agentes/pandora_networkmap.view", + page: "operation/agentes/pandora_networkmap.view", add_interface_relation: 1, id: networkmap_id, source_value: source_value, @@ -2414,118 +2262,117 @@ function refresh_holding_area() { var pos_x = parseInt(holding_pos_x) + parseInt(node_radius); var pos_y = parseInt(holding_pos_y) + parseInt(node_radius); - if (enterprise_installed) { - $("#holding_spinner_" + networkmap_id).css("display", ""); - var params = []; - params.push("refresh_holding_area=1"); - params.push("id=" + networkmap_id); - params.push("x=" + pos_x); - params.push("y=" + pos_y); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - window.holding_area = data["holding_area"]; - jQuery.each(holding_area.nodes, function(i, node) { - var temp_node = {}; + $("#holding_spinner_" + networkmap_id).css("display", ""); + var params = []; + params.push("refresh_holding_area=1"); + params.push("id=" + networkmap_id); + params.push("x=" + pos_x); + params.push("y=" + pos_y); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + window.holding_area = data["holding_area"]; - temp_node["id"] = - Math.max.apply( - Math, - graph.nodes.map(function(o) { - return o.id; - }) - ) + 1; - holding_area.nodes[i]["id"] = temp_node["id"]; + jQuery.each(holding_area.nodes, function(i, node) { + var temp_node = {}; - temp_node["id_db"] = node["id_db"]; - temp_node["id_agent"] = node["id_agent"]; - temp_node["id_module"] = 0; - temp_node["x"] = node["x"]; - temp_node["y"] = node["y"]; - temp_node["z"] = 0; - temp_node["fixed"] = true; - temp_node["state"] = "holding_area"; - temp_node["type"] = 0; - temp_node["color"] = node["color"]; - temp_node["shape"] = node["shape"]; - temp_node["text"] = node["text"]; - temp_node["image_url"] = node["image_url"]; - temp_node["image_width"] = node["image_width"]; - temp_node["image_height"] = node["image_width"]; - temp_node["deleted"] = false; + temp_node["id"] = + Math.max.apply( + Math, + graph.nodes.map(function(o) { + return o.id; + }) + ) + 1; + holding_area.nodes[i]["id"] = temp_node["id"]; - graph.nodes.push(temp_node); - }); + temp_node["id_db"] = node["id_db"]; + temp_node["id_agent"] = node["id_agent"]; + temp_node["id_module"] = 0; + temp_node["x"] = node["x"]; + temp_node["y"] = node["y"]; + temp_node["z"] = 0; + temp_node["fixed"] = true; + temp_node["state"] = "holding_area"; + temp_node["type"] = 0; + temp_node["color"] = node["color"]; + temp_node["shape"] = node["shape"]; + temp_node["text"] = node["text"]; + temp_node["image_url"] = node["image_url"]; + temp_node["image_width"] = node["image_width"]; + temp_node["image_height"] = node["image_width"]; + temp_node["deleted"] = false; - jQuery.each(graph.links, function(j, g_link) { - for (var i = 0; i < holding_area.links.length; i++) { - if (g_link["id_db"] == holding_area.links[i]["id_db"]) { - holding_area.links.splice(i, 1); - } + graph.nodes.push(temp_node); + }); + + jQuery.each(graph.links, function(j, g_link) { + for (var i = 0; i < holding_area.links.length; i++) { + if (g_link["id_db"] == holding_area.links[i]["id_db"]) { + holding_area.links.splice(i, 1); + } + } + }); + + jQuery.each(holding_area.links, function(i, link) { + var temp_link = {}; + temp_link["id_db"] = link["id_db"]; + temp_link["arrow_start"] = link["arrow_start"]; + temp_link["arrow_end"] = link["arrow_end"]; + temp_link["status_start"] = link["status_start"]; + temp_link["status_end"] = link["status_end"]; + temp_link["id_module_start"] = link["id_module_start"]; + temp_link["id_module_end"] = link["id_module_end"]; + temp_link["text_start"] = link["text_start"]; + temp_link["text_end"] = link["text_end"]; + + //Re-hook the links to nodes + jQuery.each(graph.nodes, function(j, node) { + if (node["id_agent"] == link["id_agent_end"]) { + temp_link["target"] = graph.nodes[j]; + } + if (node["id_agent"] == link["id_agent_start"]) { + temp_link["source"] = graph.nodes[j]; } }); - jQuery.each(holding_area.links, function(i, link) { - var temp_link = {}; - temp_link["id_db"] = link["id_db"]; - temp_link["arrow_start"] = link["arrow_start"]; - temp_link["arrow_end"] = link["arrow_end"]; - temp_link["status_start"] = link["status_start"]; - temp_link["status_end"] = link["status_end"]; - temp_link["id_module_start"] = link["id_module_start"]; - temp_link["id_module_end"] = link["id_module_end"]; - temp_link["text_start"] = link["text_start"]; - temp_link["text_end"] = link["text_end"]; + graph.links.push(temp_link); + }); - //Re-hook the links to nodes - jQuery.each(graph.nodes, function(j, node) { - if (node["id_agent"] == link["id_agent_end"]) { - temp_link["target"] = graph.nodes[j]; - } - if (node["id_agent"] == link["id_agent_start"]) { - temp_link["source"] = graph.nodes[j]; - } - }); + $("#layer_graph_links_" + networkmap_id).remove(); + $("#layer_graph_nodes_" + networkmap_id).remove(); - graph.links.push(temp_link); - }); + 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); - $("#layer_graph_links_" + networkmap_id).remove(); - $("#layer_graph_nodes_" + networkmap_id).remove(); + force + .nodes(graph.nodes) + .links(graph.links) + .start(); - 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); + window.node = layer_graph_nodes.selectAll(".node"); + window.link = layer_graph_links.selectAll(".link"); - force - .nodes(graph.nodes) - .links(graph.links) - .start(); + draw_elements_graph(); + init_drag_and_drop(); + set_positions_graph(); - window.node = layer_graph_nodes.selectAll(".node"); - window.link = layer_graph_links.selectAll(".link"); - - draw_elements_graph(); - init_drag_and_drop(); - set_positions_graph(); - - $("#holding_spinner_" + networkmap_id).css("display", "none"); - } - }, - error: function() { $("#holding_spinner_" + networkmap_id).css("display", "none"); } - }); - } + }, + error: function() { + $("#holding_spinner_" + networkmap_id).css("display", "none"); + } + }); } function restart_map() { @@ -2637,7 +2484,7 @@ function proceed_to_restart_map() { var params = []; params.push("get_reset_map_form=1"); params.push("map_id=" + networkmap_id); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); + params.push("page=operation/agentes/pandora_networkmap.view"); jQuery.ajax({ data: params.join("&"), dataType: "html", @@ -2655,7 +2502,7 @@ function reset_map_from_form(new_elements) { var data = new_elements; data.map_id = networkmap_id; data.reset_map = 1; - data.page = "enterprise/operation/agentes/pandora_networkmap.view"; + data.page = "operation/agentes/pandora_networkmap.view"; jQuery.ajax({ data: data, dataType: "json", @@ -2670,39 +2517,98 @@ function reset_map_from_form(new_elements) { } function set_parent(parent_data) { - if (enterprise_installed) { - var selection = d3.selectAll(".node_children"); + var selection = d3.selectAll(".node_children"); - count = selection.size(); + var count = selection.size(); - selection.each(function(child_data) { - //Check if exist the link as - // repeat: - // old link: node1 (parent) - node2 (child) - // new link: node1 (parent) - node2 (child) - // - // swapped: - // old link: node1 (child) - node2 (parent) - // new link: node2 (child) - node1 (parent) + selection.each(function(child_data) { + //Check if exist the link as + // repeat: + // old link: node1 (parent) - node2 (child) + // new link: node1 (parent) - node2 (child) + // + // swapped: + // old link: node1 (child) - node2 (parent) + // new link: node2 (child) - node1 (parent) - var repeat = false; - jQuery.each(graph.links, function(i, link_item) { - if ( - link_item.source_id_db == child_data.id_db && - link_item.target_id_db == parent_data.id_db - ) { - repeat = true; + var repeat = false; + jQuery.each(graph.links, function(i, link_item) { + if ( + link_item.source_id_db == child_data.id_db && + link_item.target_id_db == parent_data.id_db + ) { + repeat = true; + } + + if ( + link_item.source_id_db == parent_data.id_db && + link_item.target_id_db == child_data.id_db + ) { + repeat = true; + } + }); + + if (repeat) { + count = count - 1; + if (count == 0) { + draw_elements_graph(); + set_positions_graph(); + + cancel_set_parent(); + cancel_set_parent_interface(); + } + + return; //Break + } + + var params = []; + params.push("set_relationship=1"); + params.push("id=" + networkmap_id); + params.push("child=" + child_data.id_db); + params.push("parent=" + parent_data.id_db); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + var child_index = -1; + var parent_index = -1; + + // Get indexes of child and parent nodes. + $.each(graph.nodes, function(i, d) { + if (child_data.id == d.id) { + child_index = i; + } + + if (parent_data.id == d.id) { + parent_index = i; + } + }); + + //Add the relationship and paint + var item = {}; + item["arrow_start"] = ""; + item["arrow_end"] = ""; + item["status_start"] = ""; + item["status_end"] = ""; + item["text_start"] = ""; + item["text_end"] = ""; + item["id_module_start"] = 0; + item["id_module_end"] = 0; + item["id_db"] = data["id"]; + item["source_id_db"] = child_data.id_db; + item["target_id_db"] = parent_data.id_db; + item["id_agent_start"] = graph.nodes[child_index]["id_agent"]; + item["id_agent_end"] = graph.nodes[parent_index]["id_agent"]; + item["target"] = graph.nodes[parent_index]; + item["source"] = graph.nodes[child_index]; + + graph.links.push(item); } - - if ( - link_item.source_id_db == parent_data.id_db && - link_item.target_id_db == child_data.id_db - ) { - repeat = true; - } - }); - - if (repeat) { + //update_networkmap(); count = count - 1; if (count == 0) { draw_elements_graph(); @@ -2711,70 +2617,9 @@ function set_parent(parent_data) { cancel_set_parent(); cancel_set_parent_interface(); } - - return; //Break } - - var params = []; - params.push("set_relationship=1"); - params.push("id=" + networkmap_id); - params.push("child=" + child_data.id_db); - params.push("parent=" + parent_data.id_db); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - var child_index = -1; - var parent_index = -1; - - // Get indexes of child and parent nodes. - $.each(graph.nodes, function(i, d) { - if (child_data.id == d.id) { - child_index = i; - } - - if (parent_data.id == d.id) { - parent_index = i; - } - }); - - //Add the relationship and paint - item = {}; - item["arrow_start"] = ""; - item["arrow_end"] = ""; - item["status_start"] = ""; - item["status_end"] = ""; - item["text_start"] = ""; - item["text_end"] = ""; - item["id_module_start"] = 0; - item["id_module_end"] = 0; - item["id_db"] = data["id"]; - item["source_id_db"] = child_data.id_db; - item["target_id_db"] = parent_data.id_db; - item["id_agent_start"] = graph.nodes[child_index]["id_agent"]; - item["id_agent_end"] = graph.nodes[parent_index]["id_agent"]; - item["target"] = graph.nodes[parent_index]; - item["source"] = graph.nodes[child_index]; - - graph.links.push(item); - } - //update_networkmap(); - count = count - 1; - if (count == 0) { - draw_elements_graph(); - set_positions_graph(); - - cancel_set_parent(); - cancel_set_parent_interface(); - } - } - }); }); - } + }); } function cancel_set_parent_interface() { @@ -2814,7 +2659,7 @@ function init_drag_and_drop() { .on("dragstart", function() { if (d3.event.sourceEvent.button == 2) return; - mouse_coords = d3.mouse(this); + var mouse_coords = d3.mouse(this); drag_start[0] = drag_end[0] = mouse_coords[0]; drag_start[1] = drag_end[1] = mouse_coords[1]; @@ -2829,57 +2674,18 @@ function init_drag_and_drop() { var selection = d3.selectAll(".node_selected"); - if (enterprise_installed) { - var holding_pos_x = d3 - .select("#holding_area_" + networkmap_id) - .attr("x"); - var holding_pos_y = d3 - .select("#holding_area_" + networkmap_id) - .attr("y"); - delete d.raw_text; - selection.each(function(d) { - jQuery.ajax({ - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - data: { - node: JSON.stringify(d), - x: holding_pos_x, - y: holding_pos_y, - update_node: 1, - page: "enterprise/operation/agentes/pandora_networkmap.view" - }, - success: function(data) { - if (d.state == "holding_area") { - //It is out the holding area - if (data["state"] == "") { - //Remove the style of nodes and links - //in holding area - d3.select("#id_node_" + d.id + networkmap_id).classed( - "holding_area", - false - ); - d3.select(".source_" + d.id + networkmap_id).classed( - "holding_area_link", - false - ); - d3.select(".target_" + d.id + networkmap_id).classed( - "holding_area_link", - false - ); - graph.nodes[d.id].state = ""; - } - } - } - }); - }); - } else { + var holding_pos_x = d3.select("#holding_area_" + networkmap_id).attr("x"); + var holding_pos_y = d3.select("#holding_area_" + networkmap_id).attr("y"); + delete d.raw_text; + selection.each(function(d) { jQuery.ajax({ dataType: "json", type: "POST", url: window.base_url_homedir + "/ajax.php", data: { node: JSON.stringify(d), + x: holding_pos_x, + y: holding_pos_y, update_node: 1, page: "operation/agentes/pandora_networkmap.view" }, @@ -2906,16 +2712,16 @@ function init_drag_and_drop() { } } }); - } + }); d3.event.sourceEvent.stopPropagation(); }) .on("drag", function(d, i) { if (d3.event.sourceEvent.button == 2) return; - mouse_coords = d3.mouse(this); + var mouse_coords = d3.mouse(this); - delta = [0, 0]; + var delta = [0, 0]; delta[0] = mouse_coords[0] - drag_end[0]; delta[1] = mouse_coords[1] - drag_end[1]; @@ -2949,96 +2755,60 @@ function add_fictional_node() { var x = (click_menu_position_svg[0] - translation[0]) / scale; var y = (click_menu_position_svg[1] - translation[1]) / scale; - if (enterprise_installed) { - var params = []; - params.push("create_fictional_point=1"); - params.push("id=" + networkmap_id); - params.push("name=" + name); - params.push("networkmap=" + networkmap_to_link); - params.push("color=" + module_color_status[0]["color"]); - params.push("radious=" + node_radius); - params.push("shape=circle"); - params.push("x=" + x); - params.push("y=" + y); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - $("#dialog_node_add").dialog("close"); + var params = []; + params.push("create_fictional_point=1"); + params.push("id=" + networkmap_id); + params.push("name=" + name); + params.push("networkmap=" + networkmap_to_link); + params.push("color=" + module_color_status[0]["color"]); + params.push("radious=" + node_radius); + params.push("shape=circle"); + params.push("x=" + x); + params.push("y=" + y); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + $("#dialog_node_add").dialog("close"); - const new_id = - Math.max.apply( - Math, - graph.nodes.map(function(o) { - return o.id; - }) - ) + 1; + const new_id = + Math.max.apply( + Math, + graph.nodes.map(function(o) { + return o.id; + }) + ) + 1; - var temp_node = {}; - temp_node["id"] = new_id; - temp_node["id_db"] = data["id_node"]; - temp_node["id_agent"] = data["id_agent"]; - temp_node["id_module"] = 0; - temp_node["x"] = x; - temp_node["y"] = y; - temp_node["z"] = 0; - temp_node["fixed"] = true; - temp_node["type"] = 3; - temp_node["color"] = data["color"]; - temp_node["shape"] = data["shape"]; - temp_node["text"] = data["text"]; - temp_node["image_url"] = ""; - temp_node["image_width"] = 0; - temp_node["image_height"] = 0; - temp_node["networkmap_id"] = networkmap_to_link; + var temp_node = {}; + temp_node["id"] = new_id; + temp_node["id_db"] = data["id_node"]; + temp_node["id_agent"] = data["id_agent"]; + temp_node["id_module"] = 0; + temp_node["x"] = x; + temp_node["y"] = y; + temp_node["z"] = 0; + temp_node["fixed"] = true; + temp_node["type"] = 3; + temp_node["color"] = data["color"]; + temp_node["shape"] = data["shape"]; + temp_node["text"] = data["text"]; + temp_node["image_url"] = ""; + temp_node["image_width"] = 0; + temp_node["image_height"] = 0; + temp_node["networkmap_id"] = networkmap_to_link; - graph.nodes.push(temp_node); + graph.nodes.push(temp_node); - draw_elements_graph(); - init_drag_and_drop(); - set_positions_graph(); - } + draw_elements_graph(); + init_drag_and_drop(); + set_positions_graph(); } - }); - } else { - $("#dialog_node_add").dialog("close"); - - const new_id = - Math.max.apply( - Math, - graph.nodes.map(function(o) { - return o.id; - }) - ) + 1; - - var temp_node = {}; - temp_node["id"] = new_id; - temp_node["id_db"] = data["id_node"]; - temp_node["id_agent"] = data["id_agent"]; - temp_node["id_module"] = 0; - temp_node["x"] = x; - temp_node["y"] = y; - temp_node["z"] = 0; - temp_node["fixed"] = true; - temp_node["type"] = 3; - temp_node["color"] = data["color"]; - temp_node["shape"] = data["shape"]; - temp_node["text"] = data["text"]; - temp_node["image_url"] = ""; - temp_node["image_width"] = 0; - temp_node["image_height"] = 0; - temp_node["networkmap_id"] = networkmap_to_link; - - graph.nodes.push(temp_node); - - draw_elements_graph(); - init_drag_and_drop(); - set_positions_graph(); - } + } + }); } function init_graph(parameter_object) { @@ -3366,61 +3136,59 @@ function init_graph(parameter_object) { .attr("id", "layer_graph_" + networkmap_id) .attr("transform", "translate(" + translation + ")scale(" + scale + ")"); - if (enterprise_installed) { - window.layer_graph - .append("rect") - .attr("id", "holding_area_" + networkmap_id) - .attr("width", holding_area_dimensions[0]) - .attr("height", holding_area_dimensions[1]) - .attr( - "x", - networkmap_dimensions[0] + node_radius - holding_area_dimensions[0] - ) - .attr( - "y", - networkmap_dimensions[1] + node_radius - holding_area_dimensions[1] - ) - .attr( - "style", - "fill: #e6e6e6; " + - "fill-opacity: 0.75; " + - "stroke: #dedede; " + - "stroke-width: 1; " + - "stroke-miterlimit: 4; " + - "stroke-opacity: 0.75; " + - "stroke-dasharray: none; " + - "stroke-dashoffset: 0" - ) - .attr("class", "fill_222"); - window.layer_graph - .append("text") - .append("tspan") - .attr("xml:space", "preserve") - .attr( - "style", - "font-size: 32px; " + - "font-style: normal; " + - "font-weight: normal; " + - "text-align: start; " + - "line-height: 125%; " + - "letter-spacing: 0px; " + - "word-spacing: 0px; " + - "text-anchor: start; " + - "fill: #000000; " + - "fill-opacity: 1; " + - "stroke: none; " - ) - .attr("class", "fill_fff") - .attr( - "x", - networkmap_dimensions[0] + node_radius - holding_area_dimensions[0] - ) - .attr( - "y", - networkmap_dimensions[1] + node_radius - holding_area_dimensions[1] - 10 - ) - .text(holding_area_title); - } + window.layer_graph + .append("rect") + .attr("id", "holding_area_" + networkmap_id) + .attr("width", holding_area_dimensions[0]) + .attr("height", holding_area_dimensions[1]) + .attr( + "x", + networkmap_dimensions[0] + node_radius - holding_area_dimensions[0] + ) + .attr( + "y", + networkmap_dimensions[1] + node_radius - holding_area_dimensions[1] + ) + .attr( + "style", + "fill: #e6e6e6; " + + "fill-opacity: 0.75; " + + "stroke: #dedede; " + + "stroke-width: 1; " + + "stroke-miterlimit: 4; " + + "stroke-opacity: 0.75; " + + "stroke-dasharray: none; " + + "stroke-dashoffset: 0" + ) + .attr("class", "fill_222"); + window.layer_graph + .append("text") + .append("tspan") + .attr("xml:space", "preserve") + .attr( + "style", + "font-size: 32px; " + + "font-style: normal; " + + "font-weight: normal; " + + "text-align: start; " + + "line-height: 125%; " + + "letter-spacing: 0px; " + + "word-spacing: 0px; " + + "text-anchor: start; " + + "fill: #000000; " + + "fill-opacity: 1; " + + "stroke: none; " + ) + .attr("class", "fill_fff") + .attr( + "x", + networkmap_dimensions[0] + node_radius - holding_area_dimensions[0] + ) + .attr( + "y", + networkmap_dimensions[1] + node_radius - holding_area_dimensions[1] - 10 + ) + .text(holding_area_title); window.layer_graph_links = window.layer_graph .append("g") @@ -4122,54 +3890,52 @@ function get_node_name_ov(data) { } function choose_group_for_show_agents() { - if (enterprise_installed) { - group = $("#group_for_show_agents option:selected").val(); + var group = $("#group_for_show_agents option:selected").val(); - $("#agents_filter_group").attr("disabled", true); - $("#spinner_group").css("display", ""); - if (group == -1) { - $("#agents_filter_group").html( - '" - ); - $("#spinner_group").css("display", "none"); - } else { - $("#group_for_show_agents").attr("disabled", true); + $("#agents_filter_group").attr("disabled", true); + $("#spinner_group").css("display", ""); + if (group == -1) { + $("#agents_filter_group").html( + '" + ); + $("#spinner_group").css("display", "none"); + } else { + $("#group_for_show_agents").attr("disabled", true); - var params = []; - params.push("get_agents_in_group=1"); - params.push("id=" + networkmap_id); - params.push("group=" + group); - params.push("page=enterprise/operation/agentes/pandora_networkmap.view"); - jQuery.ajax({ - data: params.join("&"), - dataType: "json", - type: "POST", - url: window.base_url_homedir + "/ajax.php", - success: function(data) { - if (data["correct"]) { - $("#agents_filter_group").html(""); - jQuery.each(data["agents"], function(id, name) { - if (typeof name == "undefined") return; + var params = []; + params.push("get_agents_in_group=1"); + params.push("id=" + networkmap_id); + params.push("group=" + group); + params.push("page=operation/agentes/pandora_networkmap.view"); + jQuery.ajax({ + data: params.join("&"), + dataType: "json", + type: "POST", + url: window.base_url_homedir + "/ajax.php", + success: function(data) { + if (data["correct"]) { + $("#agents_filter_group").html(""); + jQuery.each(data["agents"], function(id, name) { + if (typeof name == "undefined") return; - $("#agents_filter_group").append( - '" - ); - }); - - $("#agents_filter_group").removeAttr("disabled"); - $("#group_for_show_agents").removeAttr("disabled"); - $("#spinner_group").css("display", "none"); - $("input[name=add_agent_group_button]").removeAttr("disabled"); - } else { - $("#group_for_show_agents").removeAttr("disabled"); - $("#agents_filter_group").html( - '" + $("#agents_filter_group").append( + '" ); - $("#spinner_group").css("display", "none"); - } + }); + + $("#agents_filter_group").removeAttr("disabled"); + $("#group_for_show_agents").removeAttr("disabled"); + $("#spinner_group").css("display", "none"); + $("input[name=add_agent_group_button]").removeAttr("disabled"); + } else { + $("#group_for_show_agents").removeAttr("disabled"); + $("#agents_filter_group").html( + '" + ); + $("#spinner_group").css("display", "none"); } - }); - } + } + }); } } @@ -4601,7 +4367,7 @@ function move_to_networkmap_widget(networkmap_id, id_cell) { params.push("networkmap=true"); params.push("networkmap_id=" + networkmap_id); - params.push("page=enterprise/include/ajax/map_enterprise.ajax"); + params.push("page=include/ajax/map_enterprise.ajax"); jQuery.ajax({ data: params.join("&"), dataType: "html", diff --git a/pandora_console/include/javascript/tooltipster.bundle.min.js b/pandora_console/include/javascript/tooltipster.bundle.min.js new file mode 100644 index 0000000000..294181e543 --- /dev/null +++ b/pandora_console/include/javascript/tooltipster.bundle.min.js @@ -0,0 +1,2 @@ +/*! tooltipster v4.2.5 */!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void 0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return"string"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||".tooltipstered";return a(d).each(function(){var b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+" ":"";return a(c+".tooltipstered").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void 0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is("area");if(d){var e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var w=0,x=0,y=0,z=0,A="even",B=0;By&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen "),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?"auto":"";return b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else if(d(c._$origin)&&d(c._$tooltip)){var e=null;if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{e=c.__geometry();var f=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var d=a(c),g=d.css("overflow-x"),h=d.css("overflow-y");if("visible"!=g||"visible"!=h){var i=c.getBoundingClientRect();if("visible"!=g&&(e.origin.windowOffset.lefti.right))return f=!0,!1;if("visible"!=h&&(e.origin.windowOffset.topi.bottom))return f=!0,!1}return"fixed"==d.css("position")?!1:void 0}),f)c._$tooltip.css("visibility","hidden");else if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:"scroll",event:b,geo:e})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(".tooltipster-content");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var e=this,f=!0;if(e._trigger({type:"close",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if("closed"!=e.__state){var i=!0,j=new Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if("disappearing"==e.__state&&l>e.__closingTime&&e.__options.animationDuration[1]>0&&(i=!1),i){e.__closingTime=l,"disappearing"!=e.__state&&e.__stateSet("disappearing");var m=function(){clearInterval(e.__tracker),e._trigger({type:"closing",event:b}),e._$tooltip.off("."+e.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+e.__namespace+"-triggerClose"),e.__$originParents.each(function(b,c){a(c).off("scroll."+e.__namespace+"-triggerClose")}),e.__$originParents=null,a(h.window.document.body).off("."+e.__namespace+"-triggerClose"),e._$origin.off("."+e.__namespace+"-triggerClose"),e._off("dismissable"),e.__stateSet("closed"),e._trigger({type:"after",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({"-moz-animation-duration":e.__options.animationDuration[1]+"ms","-ms-animation-duration":e.__options.animationDuration[1]+"ms","-o-animation-duration":e.__options.animationDuration[1]+"ms","-webkit-animation-duration":e.__options.animationDuration[1]+"ms","animation-duration":e.__options.animationDuration[1]+"ms","transition-duration":e.__options.animationDuration[1]+"ms"}),e._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else g()}return e},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(b){var c=a(document.activeElement);(c.is("input")||c.is("textarea"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose ",l+="mouseleave."+e.__namespace+"-triggerClose "),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var b="",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose "),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&("object"!=typeof c||c instanceof Array||null==c||"object"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The "'+b+'" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return"string"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;if(b.__destroyed)b.__destroyError();else{"closed"!=b.__state?b.option("animationDuration",0)._close(null,null,!0):b.__timeoutsClear(),b._trigger("destroy"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a(h.window.document.body).off("."+b.__namespace+"-triggerOpen");var c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof b.__Content?b.__Content:a("
").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)}return b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():"closed"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof b[0]){var d="#*$~&";return this.each(function(){var e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw new Error("You called Tooltipster's \""+b[0]+'" method on an uninitialized element');if("function"!=typeof f[b[0]])throw new Error('Unknown method "'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof a||"object"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||"instance"===b[0]?(d=g,!1):void 0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||"object"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('
').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf(" rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]));var k="tooltipster.sideTip";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('
');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"), +this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1]),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]}),"string"==typeof b.__options.side){var c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option("animation");switch(k&&h.removeClass("tooltipster-"+k),a.each(["window","document"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var d=0;d=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:"position"}),e.__options.functionPosition){var m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var n,o;"top"==d.side||"bottom"==d.side?(n={prop:"left",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:"top",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.valo&&(n.val=o);var p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a}); \ No newline at end of file diff --git a/pandora_console/include/lib/Dashboard/Widgets/network_map.php b/pandora_console/include/lib/Dashboard/Widgets/network_map.php index 077b8b5f20..8d263cc8f9 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/network_map.php +++ b/pandora_console/include/lib/Dashboard/Widgets/network_map.php @@ -437,7 +437,7 @@ class NetworkMapWidget extends Widget $settings = \json_encode( [ 'cellId' => $this->cellId, - 'page' => 'enterprise/include/ajax/map_enterprise.ajax', + 'page' => 'include/ajax/map_enterprise.ajax', 'url' => ui_get_full_url('ajax.php'), 'networkmap_id' => $id_networkmap, 'x_offset' => $x_offset, diff --git a/pandora_console/include/styles/tooltipster.bundle.min.css b/pandora_console/include/styles/tooltipster.bundle.min.css new file mode 100644 index 0000000000..d8f30feec9 --- /dev/null +++ b/pandora_console/include/styles/tooltipster.bundle.min.css @@ -0,0 +1 @@ +.tooltipster-fall,.tooltipster-grow.tooltipster-show{-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-base{display:flex;pointer-events:none;position:absolute}.tooltipster-box{flex:1 1 auto}.tooltipster-content{box-sizing:border-box;max-height:100%;max-width:100%;overflow:auto}.tooltipster-ruler{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;visibility:hidden}.tooltipster-fade{opacity:0;-webkit-transition-property:opacity;-moz-transition-property:opacity;-o-transition-property:opacity;-ms-transition-property:opacity;transition-property:opacity}.tooltipster-fade.tooltipster-show{opacity:1}.tooltipster-grow{-webkit-transform:scale(0,0);-moz-transform:scale(0,0);-o-transform:scale(0,0);-ms-transform:scale(0,0);transform:scale(0,0);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform;-webkit-backface-visibility:hidden}.tooltipster-grow.tooltipster-show{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-swing{opacity:0;-webkit-transform:rotateZ(4deg);-moz-transform:rotateZ(4deg);-o-transform:rotateZ(4deg);-ms-transform:rotateZ(4deg);transform:rotateZ(4deg);-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform}.tooltipster-swing.tooltipster-show{opacity:1;-webkit-transform:rotateZ(0);-moz-transform:rotateZ(0);-o-transform:rotateZ(0);-ms-transform:rotateZ(0);transform:rotateZ(0);-webkit-transition-timing-function:cubic-bezier(.23,.635,.495,1);-webkit-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-moz-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-ms-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);-o-transition-timing-function:cubic-bezier(.23,.635,.495,2.4);transition-timing-function:cubic-bezier(.23,.635,.495,2.4)}.tooltipster-fall{-webkit-transition-property:top;-moz-transition-property:top;-o-transition-property:top;-ms-transition-property:top;transition-property:top;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-fall.tooltipster-initial{top:0!important}.tooltipster-fall.tooltipster-dying{-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;-ms-transition-property:all;transition-property:all;top:0!important;opacity:0}.tooltipster-slide{-webkit-transition-property:left;-moz-transition-property:left;-o-transition-property:left;-ms-transition-property:left;transition-property:left;-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-moz-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-ms-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);-o-transition-timing-function:cubic-bezier(.175,.885,.32,1.15);transition-timing-function:cubic-bezier(.175,.885,.32,1.15)}.tooltipster-slide.tooltipster-initial{left:-40px!important}.tooltipster-slide.tooltipster-dying{-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;-ms-transition-property:all;transition-property:all;left:0!important;opacity:0}@keyframes tooltipster-fading{0%{opacity:0}100%{opacity:1}}.tooltipster-update-fade{animation:tooltipster-fading .4s}@keyframes tooltipster-rotating{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}100%{transform:rotate(0)}}.tooltipster-update-rotate{animation:tooltipster-rotating .6s}@keyframes tooltipster-scaling{50%{transform:scale(1.1)}100%{transform:scale(1)}}.tooltipster-update-scale{animation:tooltipster-scaling .6s}.tooltipster-sidetip .tooltipster-box{background:#565656;border:2px solid #000;border-radius:4px}.tooltipster-sidetip.tooltipster-bottom .tooltipster-box{margin-top:8px}.tooltipster-sidetip.tooltipster-left .tooltipster-box{margin-right:8px}.tooltipster-sidetip.tooltipster-right .tooltipster-box{margin-left:8px}.tooltipster-sidetip.tooltipster-top .tooltipster-box{margin-bottom:8px}.tooltipster-sidetip .tooltipster-content{color:#fff;line-height:18px;padding:6px 14px}.tooltipster-sidetip .tooltipster-arrow{overflow:hidden;position:absolute}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow{height:10px;margin-left:-10px;top:0;width:20px}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow{height:20px;margin-top:-10px;right:0;top:0;width:10px}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow{height:20px;margin-top:-10px;left:0;top:0;width:10px}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow{bottom:0;height:10px;margin-left:-10px;width:20px}.tooltipster-sidetip .tooltipster-arrow-background,.tooltipster-sidetip .tooltipster-arrow-border{height:0;position:absolute;width:0}.tooltipster-sidetip .tooltipster-arrow-background{border:10px solid transparent}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-background{border-bottom-color:#565656;left:0;top:3px}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-background{border-left-color:#565656;left:-3px;top:0}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-background{border-right-color:#565656;left:3px;top:0}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-background{border-top-color:#565656;left:0;top:-3px}.tooltipster-sidetip .tooltipster-arrow-border{border:10px solid transparent;left:0;top:0}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-border{border-bottom-color:#000}.tooltipster-sidetip.tooltipster-left .tooltipster-arrow-border{border-left-color:#000}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-border{border-right-color:#000}.tooltipster-sidetip.tooltipster-top .tooltipster-arrow-border{border-top-color:#000}.tooltipster-sidetip .tooltipster-arrow-uncropped{position:relative}.tooltipster-sidetip.tooltipster-bottom .tooltipster-arrow-uncropped{top:-10px}.tooltipster-sidetip.tooltipster-right .tooltipster-arrow-uncropped{left:-10px} \ No newline at end of file