From cbe355b3ed1685f0af4dca599d9ac8caffc69f8f Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Sun, 24 Jul 2011 09:47:33 +0200 Subject: [PATCH] bacula-web: Improved jobs start and end time display - Show N/A if the job not yet start or currently running - Show N/A in elapsed time if the job not yet started --- gui/bacula-web/jobs.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index 825696ab04..215ce3a796 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -131,13 +131,21 @@ // Elapsed time for the job $start = $job['starttime']; $end = $job['endtime']; - - // Job execution execution time + + if( $start == '0000-00-00 00:00:00' or is_null($start) ) + $job['starttime'] = 'N/A'; + + if( $end == '0000-00-00 00:00:00' or is_null($end) ) + $job['endtime'] = 'N/A'; + $job['elapsed_time'] = CTimeUtils::Get_Elapsed_Time( $start, $end); + // Job Level $job['level'] = $job_levels[ $job['level'] ]; + // Job files $job['jobfiles'] = number_format( $job['jobfiles'], 0, '.', "'"); + // Job size $job['jobbytes'] = CUtils::Get_Human_Size( $job['jobbytes'] ); -- 2.39.5