diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index f6ab3d17a..26ac9c30a 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -20,9 +20,10 @@ sub jobset : Chained('/') PathPart('jobset') CaptureArgs(2) { or notFound($c, "Jobset $jobsetName doesn't exist."); } +sub jobsetIndex { + my ($self, $c, $forceStatus) = @_; -sub index : Chained('jobset') PathPart('') Args(0) { - my ($self, $c) = @_; + print STDERR "index\n"; $c->stash->{template} = 'jobset.tt'; @@ -46,7 +47,7 @@ sub index : Chained('jobset') PathPart('') Args(0) { push(@systems, $system->system); } - if(scalar(@{$c->stash->{activeJobs}}) <= 20) { + if($forceStatus || scalar(@{$c->stash->{activeJobs}}) <= 20) { my @select = (); my @as = (); push(@select, "job"); push(@as, "job"); @@ -71,6 +72,16 @@ sub index : Chained('jobset') PathPart('') Args(0) { ->search({finished => 1}, {order_by => "timestamp DESC", rows => 5 })] ; } +sub index : Chained('jobset') PathPart('') Args(0) { + my ($self, $c) = @_; + jobsetIndex($self, $c, 0); +} + +sub indexWithStatus : Chained('jobset') PathPart('') Args(1) { + my ($self, $c, $forceStatus) = @_; + jobsetIndex($self, $c, 1); +} + # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('jobset') PathPart('') CaptureArgs(0) { diff --git a/src/root/jobset.tt b/src/root/jobset.tt index 468b50f87..e9432f0fb 100644 --- a/src/root/jobset.tt +++ b/src/root/jobset.tt @@ -79,7 +79,7 @@
![]() | There are evaluation errors! |
+ [ Show status overview ] +
+ [% END %]