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:
parent
15e733852d
commit
c576382e5a
|
@ -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>
|
2013-01-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_agents.php
|
* include/functions_agents.php
|
||||||
|
|
|
@ -150,6 +150,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0,
|
||||||
$node_count++;
|
$node_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create void statistics array
|
||||||
$stats = array();
|
$stats = array();
|
||||||
|
|
||||||
// Create nodes
|
// Create nodes
|
||||||
|
@ -292,6 +293,13 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
||||||
continue;
|
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 ++;
|
$node_count ++;
|
||||||
// Save node parent information to define edges later
|
// 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)) {
|
if (empty ($nodes)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create void statistics array
|
||||||
|
$stats = array();
|
||||||
|
|
||||||
// Create nodes
|
// Create nodes
|
||||||
foreach ($nodes as $node_id => $node) {
|
foreach ($nodes as $node_id => $node) {
|
||||||
if ($center > 0 && ! networkmap_is_descendant ($node_id, $center, $parents)) {
|
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
|
// Short name
|
||||||
$name = io_safe_output($agent["nombre"]);
|
$name = io_safe_output($agent["nombre"]);
|
||||||
if ((strlen ($name) > 16) && ($cut_names)) {
|
if ((strlen ($name) > 16) && ($cut_names)) {
|
||||||
$name = substr ($name, 0, 16) . '...';
|
$name = ui_print_truncate_text($name, 16, false, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($simple == 0) {
|
if ($simple == 0) {
|
||||||
|
|
Loading…
Reference in New Issue