]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Improved jobs start and end time display
authorDavide Franco <bacula-dev@dflc.ch>
Sun, 24 Jul 2011 07:47:33 +0000 (09:47 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:27 +0000 (14:49 +0200)
 - 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

index 825696ab04e0c9a1f6cae5f7464d617935614d1c..215ce3a7965c3c44f6269c26e550ba65419ec826 100644 (file)
                        // 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'] );