From d25538066d5c6bc608afa0c564061c7de53bd660 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sat, 29 Dec 2007 09:11:43 +0000 Subject: [PATCH] ebl Cleanup git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6151 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/lib/Bweb.pm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 6b27b1834c..7a9604112e 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -4607,19 +4607,17 @@ sub display_next_job my $b = $self->get_bconsole(); my $job = $b->send_cmd("show job=\"$arg->{job}\""); - if ($job !~ /Schedule: name=([\w\d\-]+)/s) { + my $attr = $self->run_parse_job($job); + + if (!$attr->{schedule}) { return $self->error("Can't get $arg->{job} schedule"); } - my $jsched = $1; - my $jpool=''; - if ($job =~ /Pool: name=([\w\d\-]+) PoolType=/) { - $jpool = $1; - } + my $jpool=$attr->{pool} || ''; - my $sched = new Bweb::Sched(bconsole => $b, name => $jsched, + my $sched = new Bweb::Sched(bconsole => $b, name => $attr->{schedule}, begin => $arg->{begin}, end => $arg->{end}); - my $ss = $sched->get_scheds($jsched); + my $ss = $sched->get_scheds($attr->{schedule}); my @ret; foreach my $s (@$ss) { -- 2.39.5