Fixed errors in php
This commit is contained in:
parent
ef4feb7006
commit
3e0b8a0f52
|
@ -468,7 +468,7 @@ function config_update_config () {
|
|||
if (!config_update_value ('type_module_charts', (string) get_parameter('type_module_charts', 'area')))
|
||||
$error_update[] = __('Default type of module charts.');
|
||||
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
|
||||
$error_update[] = __('Display dara of proc modules in other format');
|
||||
$error_update[] = __('Display data of proc modules in other format');
|
||||
if (!config_update_value ('render_proc_ok', (string) get_parameter('render_proc_ok', __('Ok') )))
|
||||
$error_update[] = __('Display text proc modules have state is ok');
|
||||
if (!config_update_value ('render_proc_fail', (string) get_parameter('render_proc_fail', __('Fail') )))
|
||||
|
|
|
@ -1638,7 +1638,8 @@ function modules_get_agentmodule_data ($id_agent_module, $period,
|
|||
case 31:
|
||||
if ( $config["render_proc"] ) {
|
||||
$sql = sprintf ("
|
||||
SELECT IF(datos >= 1, 'OK', 'FAIL') as data, utimestamp
|
||||
SELECT IF(datos >= 1, '" . $config["render_proc_ok"] . "', '" .
|
||||
$config["render_proc_fail"] . "') as data, utimestamp
|
||||
FROM tagente_datos
|
||||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp > %d AND utimestamp <= %d
|
||||
|
|
|
@ -135,6 +135,7 @@ if (!empty($result_groups)) {
|
|||
echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Critical") . "</th>";
|
||||
echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Alert fired") . "</th>";
|
||||
echo "</tr>";
|
||||
|
||||
foreach ($result_groups as $data) {
|
||||
|
||||
// Calculate entire row color
|
||||
|
@ -150,14 +151,15 @@ if (!empty($result_groups)) {
|
|||
$color_class = 'group_view_warn';
|
||||
$status_image = ui_print_status_image ('agent_warning_ball.png', "", true);
|
||||
}
|
||||
elseif ($data["_monitors_ok_"] > 0) {
|
||||
|
||||
$color_class = 'group_view_ok';
|
||||
$status_image = ui_print_status_image ('agent_ok_ball.png', "", true);
|
||||
}
|
||||
elseif (($data["_monitors_unknown_"] > 0) || ($data["_agents_unknown_"] > 0)) {
|
||||
$color_class = 'group_view_unk';
|
||||
$status_image = ui_print_status_image ('agent_no_monitors_ball.png', "", true);
|
||||
}
|
||||
elseif ($data["_monitors_ok_"] > 0) {
|
||||
$color_class = 'group_view_ok';
|
||||
$status_image = ui_print_status_image ('agent_ok_ball.png', "", true);
|
||||
}
|
||||
else {
|
||||
$color_class = '';
|
||||
$status_image = ui_print_status_image ('agent_no_data_ball.png', "", true);
|
||||
|
|
Loading…
Reference in New Issue