2012-11-27 Sergio Martin <sergio.martin@artica.es>

* include/functions_networkmap.php: Performance improvements
	in networkmaps



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7188 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-11-27 09:42:41 +00:00
parent de245b5996
commit 0f95ba32fe
2 changed files with 11 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2012-11-27 Sergio Martin <sergio.martin@artica.es>
* include/functions_networkmap.php: Performance improvements
in networkmaps
2012-11-27 Sergio Martin <sergio.martin@artica.es>
* godmode/massive/massive_delete_modules.php: Fixed a bug

View File

@ -84,7 +84,8 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0,
}
else {
$agents = agents_get_agents ($filter,
array ('id_grupo, nombre, id_os, id_parent, id_agente, normal_count, warning_count, critical_count, unknown_count, total_count, notinit_count'));
array ('id_grupo, nombre, id_os, id_parent, id_agente,
normal_count, warning_count, critical_count, unknown_count, total_count, notinit_count'));
}
if ($agents === false)
@ -277,7 +278,8 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
if ($depth != 'group') {
// Get agents data
$agents = agents_get_agents ($filter,
array ('id_grupo, nombre, id_os, id_agente'));
array ('id_grupo, nombre, id_os, id_agente,
normal_count, warning_count, critical_count, unknown_count, total_count, notinit_count'));
if ($agents === false)
$agents = array();
@ -491,12 +493,7 @@ function networkmap_create_group_node ($group, $simple = 0, $font_size = 10, $me
function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cut_names = true, $relative = false, $metaconsole = false, $id_server = null) {
global $config;
if (defined('METACONSOLE')) {
$status = agents_get_status_from_counts($agent);
}
else {
$status = agents_get_status($agent['id_agente']);
}
// Set node status
switch ($status) {