2012-06-20 Sergio Martin <sergio.martin@artica.es>

* include/functions_modules.php
	godmode/agentes/module_manager.php: Added not init status
	in the manage modules view for bug 3533341

	MERGED FROM 4.0.2



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6611 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-06-20 09:03:30 +00:00
parent 5e2b2f59e1
commit e197350df4
3 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,11 @@
2012-06-20 Sergio Martin <sergio.martin@artica.es>
* include/functions_modules.php
godmode/agentes/module_manager.php: Added not init status
in the manage modules view for bug 3533341
MERGED FROM 4.0.2
2012-06-20 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php, include/functions.php: cleaned source

View File

@ -513,9 +513,12 @@ foreach ($modules as $module) {
$data[2] = servers_show_type ($module['id_modulo']);
}
$module_status = db_get_row('tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']);
modules_get_status($module['id_agente_modulo'], $module_status['estado'], $module_status['datos'], $status, $title);
// This module is initialized ? (has real data)
$module_init = db_get_value ('utimestamp', 'tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']);
if ($module_init == 0)
if ($status == STATUS_MODULE_NO_DATA)
$data[2] .= html_print_image ('images/error.png', true, array ('title' => __('Non initialized module')));
// Module type (by data type)
@ -534,10 +537,6 @@ foreach ($modules as $module) {
$data[5] = ui_print_truncate_text($module['descripcion'], 'description', false);
$module_status = db_get_row('tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']);
modules_get_status($module['id_agente_modulo'], $module_status['estado'], $module_status['datos'], $status, $title);
$data[6] = ui_print_status_image($status, $title, true);
// MAX / MIN values

View File

@ -1210,7 +1210,13 @@ function modules_get_status($id_agent_module, $db_status, $data, &$status, &$tit
$status = STATUS_MODULE_WARNING;
$title = "";
if ($db_status == 1) {
// This module is initialized ? (has real data)
$module_init = db_get_value ('utimestamp', 'tagente_estado', 'id_agente_modulo', $id_agent_module);
if ($module_init == 0) {
$status = STATUS_MODULE_NO_DATA;
$title = __('NOT INIT');
}
elseif ($db_status == 1) {
$status = STATUS_MODULE_CRITICAL;
$title = __('CRITICAL');
}