From 3d75159075a2a43dfc17d0157403ba581b75aa3d Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 5 May 2014 09:21:43 +0000 Subject: [PATCH] 2014-05-05 Juan Manuel Ramon * include/functions_agents.php include/functions_networkmap.php: Fixed not init agent state in networkmap. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9855 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_agents.php | 6 +++++- pandora_console/include/functions_networkmap.php | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2519a4a64e..cf098c1f90 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2014-05-05 Juan Manuel Ramon + + * include/functions_agents.php + include/functions_networkmap.php: Fixed not init agent state + in networkmap. + 2014-05-05 Vanessa Gil * operation/agentes/estado_generalagente.php: Add incident view diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 8e5bd080de..4f56852704 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -1484,7 +1484,11 @@ function agents_get_status_from_counts($agent) { !isset($agent['total_count'])) { return -1; } - + + # Juanma (05/05/2014) Fix: This status is not init! 0 modules or all not init + if ($agent['notinit_count'] == $agent['total_count']) { + return AGENT_MODULE_STATUS_NOT_INIT; + } if ($agent['critical_count'] > 0) { return AGENT_MODULE_STATUS_CRITICAL_BAD; } diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index b7d1461b39..4a5e7d99c7 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -922,6 +922,10 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu case AGENT_STATUS_ALERT_FIRED: $status_color = COL_ALERTFIRED; break; + # Juanma (05/05/2014) Fix: Correct color for not init agents! + case AGENT_STATUS_NOT_INIT: + $status_color = COL_NOTINIT; + break; default: //Unknown monitor $status_color = COL_UNKNOWN;