return $self->error("Can't get $arg->{job} schedule");
}
my $jsched = $1;
+ my $jpool='';
+ if ($job =~ /Pool: name=([\w\d\-]+) PoolType=/) {
+ $jpool = $1;
+ }
my $out = $b->send_cmd("show schedule=\"$jsched\"");
my $sched = new Bweb::Sched();
$sched->parse_scheds(split(/\r?\n/, $out));
my $ss = $sched->get_scheds($jsched);
+ my @ret;
foreach my $s (@$ss) {
my $level = $sched->get_level($s);
- my $pool = $sched->get_pool($s);
+ my $pool = $sched->get_pool($s) || $jpool;
my $evt = $sched->get_event($s);
- print "$level on $pool <pre>", Data::Dumper::Dumper($evt), "</pre><br>";
+ push @ret, map { "$_ : $pool ($level)\n" } @$evt;
}
+
+ print "<b>$arg->{job}:</b><pre>", sort @ret, "</pre><br>";
}
1;
<br/>
<button type="submit" class="bp" name='action' value='enable_job' title='Enable'> <img src='/bweb/inflag1.png' alt=''> Enable </button>
<button type="submit" class="bp" name='action' value='disable_job' title='Disable' > <img src='/bweb/inflag0.png' alt=''> Disable </button>
+ <button type="submit" class="bp" name='action' value='next_job2' title='Show schedule' > <img src='/bweb/zoom.png' alt=''> Show schedule </button>
<button type="submit" class="bp" name='action' value='run_job_mod' title='Run now' > <img src='/bweb/R.png' alt=''> Run now </button>
</form>
</div>