diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index f1fed9dc..2dc2aa3b 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -151,8 +151,8 @@ sub jobs_tab : Chained('jobsetChain') PathPart('jobs-tab') Args(0) { $c->stash->{activeJobs} = []; $c->stash->{inactiveJobs} = []; - (my $latestEval) = $c->stash->{jobset}->jobsetevals->search( - { hasnewbuilds => 1}, { limit => 1, order_by => ["id desc"] }); + my $latestEval = $c->stash->{jobset}->jobsetevals->search( + { hasnewbuilds => 1}, { limit => 1, order_by => ["id desc"] })->single; my %activeJobs; if (defined $latestEval) { @@ -173,42 +173,6 @@ sub jobs_tab : Chained('jobsetChain') PathPart('jobs-tab') Args(0) { } -sub status_tab : Chained('jobsetChain') PathPart('status-tab') Args(0) { - my ($self, $c) = @_; - $c->stash->{template} = 'jobset-status-tab.tt'; - - # FIXME: use latest eval instead of iscurrent. - - $c->stash->{systems} = - [ $c->stash->{jobset}->builds->search({ iscurrent => 1 }, { select => ["system"], distinct => 1, order_by => "system" }) ]; - - # status per system - my @systems = (); - foreach my $system (@{$c->stash->{systems}}) { - push(@systems, $system->system); - } - - my @select = (); - my @as = (); - push(@select, "job"); push(@as, "job"); - foreach my $system (@systems) { - push(@select, "(select buildstatus from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))"); - push(@as, $system); - push(@select, "(select b.id from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))"); - push(@as, "$system-build"); - } - - $c->stash->{activeJobsStatus} = [ - $c->model('DB')->resultset('ActiveJobsForJobset')->search( - {}, - { bind => [$c->stash->{project}->name, $c->stash->{jobset}->name] - , select => \@select - , as => \@as - , order_by => ["job"] - }) ]; -} - - # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; diff --git a/src/root/jobset-status-tab.tt b/src/root/jobset-status-tab.tt deleted file mode 100644 index d12d4ae5..00000000 --- a/src/root/jobset-status-tab.tt +++ /dev/null @@ -1,23 +0,0 @@ -[% PROCESS common.tt %] - -
Job | [% FOREACH s IN systems %][% s.system %] | [% END %]
---|---|
[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %] | - [% FOREACH s IN systems %] - [% system = s.system %] - [% systemStatus = j.get_column(system) %] -- [% IF systemStatus != undef %] - - [% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %] - - [% END %] - | - [% END %] -
Errors occurred at [% INCLUDE renderDateTime timestamp=jobset.errortime %].