From: Davide Franco Date: Sun, 24 Jul 2011 07:47:33 +0000 (+0200) Subject: bacula-web: Improved jobs start and end time display X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cbe355b3ed1685f0af4dca599d9ac8caffc69f8f;p=bacula%2Fbacula 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 --- 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'] );