diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 915f0ebe30..88fd1f14c7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-01-10 Juan Manuel Ramon + + * include/functions_networkmap.php: Fixed entity problem in + networkmap and hided agents without alerts if "only module with + alerts" option enabled. + + Merged from branches. + 2013-01-10 Juan Manuel Ramon * include/functions_agents.php diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 4ee87ab509..e83c92d01b 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -150,6 +150,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0, $node_count++; } + // Create void statistics array $stats = array(); // Create nodes @@ -292,6 +293,13 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0, continue; } } + + // If only agents with alerts => agents without alerts discarded + $alert_agent = agents_get_alerts($agent['id_agente']); + + if ($modwithalerts and empty($alert_agent['simple']) and empty($alert_agent['compounds'])){ + continue; + } $node_count ++; // Save node parent information to define edges later @@ -347,6 +355,10 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0, if (empty ($nodes)) { return false; } + + // Create void statistics array + $stats = array(); + // Create nodes foreach ($nodes as $node_id => $node) { if ($center > 0 && ! networkmap_is_descendant ($node_id, $center, $parents)) { @@ -517,7 +529,7 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu // Short name $name = io_safe_output($agent["nombre"]); if ((strlen ($name) > 16) && ($cut_names)) { - $name = substr ($name, 0, 16) . '...'; + $name = ui_print_truncate_text($name, 16, false, true, false); } if ($simple == 0) {