diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a82a335488..075796ec7f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2012-04-19 Sancho Lerena + + * operation/agentes/estado_monitores.php: Put units in module view. + Fixed a Postgrest missing ")" in SQL. + + * operation/agentes/status_monitor.php: Put units in module view. + + * operation/agentes/alerts_status.php: better layout on alert + tabular view, now using dynamic width. + 2012-04-19 Juan Manuel Ramon * operation/gis_maps/render_view.php: Resize GIS map on normal view. diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 0dec322b36..af799d73f5 100644 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -284,16 +284,6 @@ $table->align = array (); if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { if ($print_agent) { - $table->size[0] = '20px'; - $table->size[1] = '20px'; - $table->size[2] = '20px'; - $table->size[3] = '25%'; - $table->size[4] = '25%'; - $table->size[5] = '30%'; - $table->size[6] = '30%'; - $table->size[7] = '20px'; - $table->size[8] = '60px'; - $table->head[0] = "" . __('P.') . ""; $table->head[1] = "" . __('S.') . ""; $table->head[2] = "" . __('F.') . ""; @@ -316,14 +306,6 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->align[9] = 'center'; } else { - $table->size[0] = '20px'; - $table->size[1] = '20px'; - $table->size[2] = '20px'; - $table->size[3] = '25%'; - $table->size[4] = '50%'; - $table->size[5] = '25%'; - $table->size[6] = '20px'; - $table->size[7] = '60px'; $table->head[0] = "" . __('P.') . ""; $table->head[1] = "" . __('S.') . ""; @@ -347,14 +329,6 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { else { if ($print_agent) { - $table->size[0] = '20px'; - $table->size[1] = '20px'; - $table->size[2] = '25%'; - $table->size[3] = '25%'; - $table->size[4] = '50%'; - $table->size[5] = '25%'; - $table->size[6] = '20px'; - $table->size[7] = '60px'; $table->head[0] = "" . __('S.') . ""; $table->head[1] = "" . __('F.') . ""; @@ -377,14 +351,6 @@ else $table->align[8] = 'center'; } else { - $table->size[0] = '20px'; - $table->size[1] = '20px'; - $table->size[2] = '25%'; - $table->size[3] = '50%'; - $table->size[4] = '25%'; - $table->size[5] = '20px'; - $table->size[6] = '60px'; - $table->head[0] = "" . __('S.') . ""; $table->head[1] = "" . __('F.') . ""; $table->head[2] = __('Module') . ' ' . diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index a6578299e3..5fda27b484 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -347,6 +347,11 @@ foreach ($modules as $module) { else { if (is_numeric($module["datos"])){ $salida = format_numeric($module["datos"]); + + // Show units ONLY in numeric data types + if (isset($module["unit"])){ + $salida .= " " . ''. io_safe_output($module["unit"]) . ''; + } } else { $module_value = io_safe_output($module["datos"]); diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index bbdc084a57..c7fb1d7f40 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -394,6 +394,7 @@ switch ($config["dbtype"]) { tagente_modulo.min_warning, tagente_modulo.max_warning, tagente_modulo.str_warning, + tagente_modulo.unit, tagente_modulo.min_critical, tagente_modulo.max_critical, tagente_modulo.str_critical, @@ -419,6 +420,7 @@ switch ($config["dbtype"]) { tagente_modulo.max_warning, tagente_modulo.str_warning, tagente_modulo.min_critical, + tagente_modulo.unit, tagente_modulo.max_critical, tagente_modulo.str_critical, tagente_modulo.extended_info, @@ -443,6 +445,7 @@ switch ($config["dbtype"]) { tagente_modulo.min_warning, tagente_modulo.max_warning, tagente_modulo.str_warning, + tagente_modulo.unit, tagente_modulo.min_critical, tagente_modulo.max_critical, tagente_modulo.str_critical, @@ -628,8 +631,14 @@ foreach ($result as $row) { $data[7] = ui_print_module_warn_value($row['max_warning'], $row['min_warning'], $row['str_warning'], $row['max_critical'], $row['min_critical'], $row['str_critical']); - if (is_numeric($row["datos"])) + if (is_numeric($row["datos"])){ $salida = format_numeric($row["datos"]); + + // Show units ONLY in numeric data types + if (isset($row["unit"])){ + $salida .= " " . ''. io_safe_output($row["unit"]) . ''; + } + } else { $module_value = io_safe_output($row["datos"]); $sub_string = substr(io_safe_output($row["datos"]),0, 12);