From fcef3aeb66f4394b04b0c05f860ddcb80b2a7db1 Mon Sep 17 00:00:00 2001 From: darode Date: Tue, 12 Jun 2012 11:45:24 +0000 Subject: [PATCH] 2012-06-12 Dario Rodriguez * operation/agentes/estado_agente.php: Improved performance using new functions. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6505 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ .../operation/agentes/estado_agente.php | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4984feaa9a..84d1ca1440 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-06-12 Dario Rodriguez + + * operation/agentes/estado_agente.php: Improved + performance using new functions. + + MERGED FROM 4.0.2 + 2012-06-12 Dario Rodriguez * operation/tree.php: Fixed some errors with tree view diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index ef0f493af1..669931fdc1 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -424,7 +424,21 @@ foreach ($agents as $agent) { $rowPair = !$rowPair; $iterator++; - $agent_info = reporting_get_agent_module_info ($agent["id_agente"]); + $agent_info["monitor_alertsfired"] = agents_get_alerts_fired ($agent["id_agente"]); + + $agent_info["monitor_critical"] = agents_monitor_critical ($agent["id_agente"]); + $agent_info["monitor_warning"] = agents_monitor_warning ($agent["id_agente"]); + $agent_info["monitor_unknown"] = agents_monitor_unknown ($agent["id_agente"]); + $agent_info["monitor_normal"] = agents_monitor_ok ($agent["id_agente"]); + + $agent_info["alert_img"] = agents_tree_view_alert_img ($agent_info["monitor_alertsfired"]); + + $agent_info["status_img"] = agetns_tree_view_status_img ($agent_info["monitor_critical"], + $agent_info["monitor_warning"], + $agent_info["monitor_unknown"]); + + //Count all modules + $agent_info["modules"] = $agent_info["monitor_critical"] + $agent_info["monitor_warning"] + $agent_info["monitor_unknown"] + $agent_info["monitor_normal"]; $data = array ();