From: Eric Bollengier Date: Tue, 8 Aug 2006 22:15:06 +0000 (+0000) Subject: ebl add duration to display_job X-Git-Tag: Release-2.0.0~632 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=78a04554b99b1f54c1d14a7ec95881b46ffeb014;p=bacula%2Fbacula ebl add duration to display_job git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3273 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 7badb6a637..c14fed016a 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -1802,6 +1802,10 @@ SELECT Job.JobId AS jobid, JobFiles AS jobfiles, JobBytes AS jobbytes, JobStatus AS jobstatus, + $self->{sql}->{SEC_TO_TIME}( $self->{sql}->{UNIX_TIMESTAMP}(EndTime) + - $self->{sql}->{UNIX_TIMESTAMP}(StartTime)) + AS duration, + JobErrors AS joberrors FROM Client, @@ -2521,7 +2525,7 @@ sub get_job_log return $self->error("Can't get jobid"); } - my $t = CGI::param('time') || ''; + my $t = CGI::param('time') || ''; my $query = " SELECT Job.Name as name, Client.Name as clientname @@ -2540,12 +2544,14 @@ SELECT Job.Name as name, Client.Name as clientname SELECT Time AS time, LogText AS log FROM Log WHERE JobId = $arg->{jobid} + ORDER BY Time "; my $log = $self->dbh_selectall_arrayref($query); unless ($log) { return $self->error("Can't get log for jobid $arg->{jobid}"); } + my $logtxt; if ($t) { # log contains \n $logtxt = join("", map { ($_->[0] . ' ' . $_->[1]) } @$log ) ; diff --git a/gui/bweb/tpl/display_job.tpl b/gui/bweb/tpl/display_job.tpl index 1fc9fb255c..6ffb63f9d5 100644 --- a/gui/bweb/tpl/display_job.tpl +++ b/gui/bweb/tpl/display_job.tpl @@ -19,7 +19,8 @@ var header = new Array("JobId", "FileSet", // "Pool", "Level", - "StartTime", + "StartTime", + "Duration", "JobFiles", "JobBytes", "Errors", @@ -45,6 +46,7 @@ data.push( new Array( //"", "", "", +"", "", "", "",