add N/A in case time last_status_change is not set

This commit is contained in:
alejandro-campos 2020-03-25 17:40:05 +01:00
parent ecc6cd8f4e
commit a8325653d4
1 changed files with 2 additions and 1 deletions

View File

@ -329,7 +329,8 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
$last_status_change = db_get_value('last_status_change', 'tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']);
$row = [];
$row['title'] = __('Last status change');
$row['data'] = human_time_comparation($last_status_change);
$time_elapsed = ($last_status_change > 0) ? human_time_comparation($last_status_change) : __('N/A');
$row['data'] = $time_elapsed;
$table->data['tags'] = $row;
// End of table