2013-01-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_networkmap.php: Fixed entity problem in 
	networkmap and hided agents without alerts if "only module with 
	alerts" option enabled.
	
	Merged from branches.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7421 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2013-01-10 14:07:52 +00:00
parent d901e47ee3
commit 8d63bcc5e6
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2013-01-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* 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 <juanmanuel.ramon@artica.es>
* include/functions_agents.php

View File

@ -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) {