diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php index 8d0039c9a8..251fde0d73 100644 --- a/pandora_console/include/class/TreeService.class.php +++ b/pandora_console/include/class/TreeService.class.php @@ -214,26 +214,37 @@ class TreeService extends Tree foreach ($data_modules as $key => $module) { switch ($module['estado']) { case '0': - $data_modules[$key]['statusImageHTML'] = 'NORMAL status.'; + $module_status = 'ok'; + $module_title = 'NORMAL'; break; case '1': - $data_modules[$key]['statusImageHTML'] = 'CRITICAL status.'; + $module_status = 'critical'; + $module_title = 'CRITICAL'; break; case '2': - $data_modules[$key]['statusImageHTML'] = 'WARNING status.'; + $module_status = 'warning'; + $module_title = 'WARNING'; + break; + + case '3': + $module_status = 'down'; + $module_title = 'UNKNOWN'; break; case '4': - $data_modules[$key]['statusImageHTML'] = 'UNKNOWN status.'; + $module_status = 'no_data'; + $module_title = 'NOT INITIALIZED'; break; default: - // code... + $module_status = 'down'; + $module_title = 'UNKNOWN'; break; } + $data_modules[$key]['statusImageHTML'] = ''.$module_title.' status.'; $data_modules[$key]['showEventsBtn'] = 1; $data_modules[$key]['eventModule'] = $module['id_agente_modulo']; }