extend status change functionality in monitor detail view custom fields

Former-commit-id: e48ae88416f50b47aac79ae28b9b4bcd08ebdf73
This commit is contained in:
alejandro-campos 2019-02-25 11:32:26 +01:00
parent 59159ec473
commit be7eadeb2c
2 changed files with 3 additions and 4 deletions

View File

@ -102,7 +102,7 @@ if ($fields_selected[0]!='') {
$result = __('Timestamp');
break;
case 'to_critical':
$result = __('Went to critical');
$result = __('Last status change');
break;
}
$result_selected[$field_selected] = $result;
@ -138,7 +138,7 @@ $fields_available['graph'] = __('Graph');
$fields_available['warn'] = __('Warn');
$fields_available['data'] = __('Data');
$fields_available['timestamp'] = __('Timestamp');
$fields_available['to_critical'] = __('Went to critical');
$fields_available['to_critical'] = __('Last status change');
//remove fields already selected
foreach ($fields_available as $key=>$available) {

View File

@ -1144,7 +1144,7 @@ if (!empty($result)) {
}
if (in_array('to_critical', $show_fields)) {
$table->head[11] = __('Went to critical');
$table->head[11] = __('Last status change');
}
$id_type_web_content_string = db_get_value('id_tipo', 'ttipo_modulo',
@ -1635,7 +1635,6 @@ if (!empty($result)) {
$change_status_timestamp = db_get_sql ('SELECT utimestamp FROM tevento WHERE id_agentmodule=' . $row['id_agente_modulo'] . ' ORDER BY utimestamp DESC');
$data[11] = ui_print_timestamp ($change_status_timestamp, true, $option);
}
array_push ($table->data, $data);