From 8b4627103a3a1e7c66b5af2080532c47636644b4 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 3 Aug 2010 11:25:37 +0000 Subject: [PATCH] 2010-08-03 Sergio Martin * operation/agentes/estado_ultimopaquete.php: Fixed log4x modules check from old id value 30 to new id value 24 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3088 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++ .../agentes/estado_ultimopaquete.php | 42 +++++++++---------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f4db198c35..6f6863fa0a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-08-03 Sergio Martin + + * operation/agentes/estado_ultimopaquete.php: Fixed log4x modules + check from old id value 30 to new id value 24 + 2010-08-03 Sergio Martin * pandoradb.sql diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index c672f3b9c4..75d378cb95 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -250,9 +250,18 @@ foreach ($modules as $module) { echo ""; } - if ($module["id_tipo_modulo"] == 30112) { + if ($module["id_tipo_modulo"] == 24) { // Log4x echo " "; echo " x"; + + switch($module["datos"]){ + case 10: echo "".__('TRACE').""; break; + case 20: echo "".__('DEBUG').""; break; + case 30: echo "".__('INFO').""; break; + case 40: echo "".__('WARN').""; break; + case 50: echo "".__('ERROR').""; break; + case 60: echo "".__('FATAL').""; break; + } } else if (($module["id_tipo_modulo"] == 100) OR ($module['history_data'] == 0)) { echo ""; @@ -261,28 +270,17 @@ foreach ($modules as $module) { $graph_type = return_graphtype ($module["id_tipo_modulo"]); - if ($module["id_tipo_modulo"] == 30) { // log4x - switch($module["datos"]){ - case 10: echo "TRACE"; break; - case 20: echo "DEBUG"; break; - case 30: echo "INFO"; break; - case 40: echo "WARN"; break; - case 50: echo "ERROR"; break; - case 60: echo "FATAL"; break; - } - } else { - if (is_numeric($module["datos"])){ - echo ""; - echo format_for_graph($module["datos"] ); - } - else { - if (strlen($module["datos"]) > 0 ) $colspan = 2; - else $colspan= 1; - echo ""; - echo substr(safe_output($module["datos"]),0,42); - } - echo ""; + if (is_numeric($module["datos"])){ + echo ""; + echo format_for_graph($module["datos"] ); } + else { + if (strlen($module["datos"]) > 0 ) $colspan = 2; + else $colspan= 1; + echo ""; + echo substr(safe_output($module["datos"]),0,42); + } + echo ""; $handle = "stat".$nombre_tipo_modulo."_".$module["id_agente_modulo"]; $url = 'include/procesos.php?agente='.$module["id_agente_modulo"];