From: Eric Bollengier Date: Tue, 1 Jul 2008 09:50:40 +0000 (+0000) Subject: ebl Fix log output to get all messages X-Git-Tag: Release-3.0.0~1208 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a4a7c5faa6e87f895a2c0640aaaddeeb70cf5aea;p=bacula%2Fbacula ebl Fix log output to get all messages git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7268 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 2d9eb7988e..6128936faa 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -4492,10 +4492,10 @@ SELECT Job.Name as name, Client.Name as clientname } $query = " -SELECT count(1) AS nbline, JobId AS jobid, - GROUP_CONCAT($logtext $self->{sql}->{CONCAT_SEP}) AS logtxt +SELECT count(1) AS nbline, + GROUP_CONCAT($logtext $self->{sql}->{CONCAT_SEP}) AS logtxt, id FROM ( - SELECT JobId, Time, LogText + SELECT 1 AS id, Time, LogText FROM Log WHERE ( Log.JobId = $arg->{jobid} OR (Log.JobId = 0 @@ -4506,7 +4506,7 @@ SELECT count(1) AS nbline, JobId AS jobid, LIMIT $arg->{limit} OFFSET $arg->{offset} ) AS temp - GROUP BY JobId + GROUP BY id "; @@ -4918,6 +4918,22 @@ sub display_next_job print "$arg->{job}:
", sort @ret, "

"; } +# permit to verify for higher level backup +# we attempt a Increment, we made a Full, that ok +# TODO: Pool may have change +sub get_higher_level +{ + my ($self, $level) = @_; + if ($level eq 'F') { + return "'F'"; + } elsif ($level eq 'D') { + return "'F', 'D'"; + } elsif ($level eq 'I') { + return "'F', 'D', 'I'"; + } + return "''"; +} + # check jobs against their schedule sub check_job { @@ -4935,6 +4951,7 @@ sub check_job } my $level = $sched->get_level($s); my ($l) = ($level =~ m/^(.)/); # we keep the first letter + $l = $self->get_higher_level($l); my $evts = $sched->get_event($s); my $end = $sched->{end}; # this backup must have start before the next one @@ -4947,7 +4964,7 @@ sub check_job AND Job.Name = '$job' AND Job.Type = '$type' AND Job.JobStatus = 'T' - AND Job.Level = '$l' + AND Job.Level IN ($l) " . ($pool?" AND Pool.Name = '$pool' ":'') . " AND Client.Name = '$client' LIMIT 1