diff --git a/src/lib/Hydra/Base/Controller/ListBuilds.pm b/src/lib/Hydra/Base/Controller/ListBuilds.pm index a852fbe3..89a22ce4 100644 --- a/src/lib/Hydra/Base/Controller/ListBuilds.pm +++ b/src/lib/Hydra/Base/Controller/ListBuilds.pm @@ -7,38 +7,6 @@ use Hydra::Helper::Nix; use Hydra::Helper::CatalystUtils; -sub getJobStatus { - my ($self, $c) = @_; - - my $maintainer = $c->request->params->{"maintainer"}; - - my $latest = $c->stash->{jobStatus}->search( - defined $maintainer ? { maintainers => { like => "%$maintainer%" } } : {}, - { '+select' => ["me.statusChangeId", "me.statusChangeTime"] - , '+as' => ["statusChangeId", "statusChangeTime"] - , order_by => "coalesce(statusChangeTime, 0) desc" - }); - - return $latest; -} - - -# A convenient way to see all the errors - i.e. things demanding -# attention - at a glance. -sub errors : Chained('get_builds') PathPart Args(0) { - my ($self, $c) = @_; - $c->stash->{template} = 'errors.tt'; - $c->stash->{brokenJobsets} = - [$c->stash->{allJobsets}->search({errormsg => {'!=' => ''}})] - if defined $c->stash->{allJobsets}; - $c->stash->{brokenJobs} = - [$c->stash->{allJobs}->search({errormsg => {'!=' => ''}})] - if defined $c->stash->{allJobs}; - $c->stash->{brokenBuilds} = - [getJobStatus($self, $c)->search({buildStatus => {'!=' => 0}})]; -} - - sub all : Chained('get_builds') PathPart { my ($self, $c) = @_; diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index 060e2424..389a0791 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -40,26 +40,26 @@ sub overview : Chained('job') PathPart('') Args(0) { # If this is an aggregate job, then get its constituents. my @constituents = $c->model('DB::Builds')->search( - { aggregate => { -in => $job->builds->search({}, { columns => ["id"], order_by => "id desc", rows => 15 })->as_query } }, - { join => 'aggregateconstituents_constituents', - columns => ['id', 'job', 'finished', 'buildstatus'], - +select => ['aggregateconstituents_constituents.aggregate'], - +as => ['aggregate'] - }); + { aggregate => { -in => $job->builds->search({}, { columns => ["id"], order_by => "id desc", rows => 15 })->as_query } }, + { join => 'aggregateconstituents_constituents', + columns => ['id', 'job', 'finished', 'buildstatus'], + +select => ['aggregateconstituents_constituents.aggregate'], + +as => ['aggregate'] + }); my $aggregates = {}; my %constituentJobs; foreach my $b (@constituents) { - my $jobName = $b->get_column('job'); - $aggregates->{$b->get_column('aggregate')}->{constituents}->{$jobName} = - { id => $b->id, finished => $b->finished, buildstatus => $b->buildstatus }; - $constituentJobs{$jobName} = 1; + my $jobName = $b->get_column('job'); + $aggregates->{$b->get_column('aggregate')}->{constituents}->{$jobName} = + { id => $b->id, finished => $b->finished, buildstatus => $b->buildstatus }; + $constituentJobs{$jobName} = 1; } foreach my $agg (keys %$aggregates) { - # FIXME: could be done in one query. - $aggregates->{$agg}->{build} = - $c->model('DB::Builds')->find({id => $agg}, {columns => [@buildListColumns]}) or die; + # FIXME: could be done in one query. + $aggregates->{$agg}->{build} = + $c->model('DB::Builds')->find({id => $agg}, {columns => [@buildListColumns]}) or die; } $c->stash->{aggregates} = $aggregates; @@ -73,7 +73,6 @@ sub get_builds : Chained('job') PathPart('') CaptureArgs(0) { $c->stash->{allBuilds} = $c->stash->{job}->builds; $c->stash->{jobStatus} = $c->model('DB')->resultset('JobStatusForJob') ->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name]}); - $c->stash->{allJobs} = $c->stash->{job_}; $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJob') ->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name]}); $c->stash->{channelBaseName} = diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 5f30fe2e..209acd4d 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -185,8 +185,6 @@ sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) { $c->stash->{allBuilds} = $c->stash->{jobset}->builds; $c->stash->{jobStatus} = $c->model('DB')->resultset('JobStatusForJobset') ->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]}); - $c->stash->{allJobsets} = $c->stash->{jobset_}; - $c->stash->{allJobs} = $c->stash->{jobset}->jobs; $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset') ->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]}); $c->stash->{channelBaseName} = diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm index a9a9bec7..78a8b09f 100644 --- a/src/lib/Hydra/Controller/Project.pm +++ b/src/lib/Hydra/Controller/Project.pm @@ -204,8 +204,6 @@ sub get_builds : Chained('projectChain') PathPart('') CaptureArgs(0) { $c->stash->{allBuilds} = $c->stash->{project}->builds; $c->stash->{jobStatus} = $c->model('DB')->resultset('JobStatusForProject') ->search({}, {bind => [$c->stash->{project}->name]}); - $c->stash->{allJobsets} = $c->stash->{project}->jobsets; - $c->stash->{allJobs} = $c->stash->{project}->jobs; $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForProject') ->search({}, {bind => [$c->stash->{project}->name]}); $c->stash->{channelBaseName} = $c->stash->{project}->name; diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index f574598d..2854f889 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -151,8 +151,6 @@ sub get_builds : Chained('/') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; $c->stash->{allBuilds} = $c->model('DB::Builds'); $c->stash->{jobStatus} = $c->model('DB')->resultset('JobStatus'); - $c->stash->{allJobsets} = $c->model('DB::Jobsets'); - $c->stash->{allJobs} = $c->model('DB::Jobs'); $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceeded'); $c->stash->{channelBaseName} = "everything"; $c->stash->{total} = $c->model('DB::NrBuilds')->find('finished')->count; diff --git a/src/root/errors.tt b/src/root/errors.tt deleted file mode 100644 index ee38e794..00000000 --- a/src/root/errors.tt +++ /dev/null @@ -1,80 +0,0 @@ -[% WRAPPER layout.tt title="Errors" %] -[% PROCESS common.tt %] - -

This page provides a quick way to see how FUBARed your packages -are. It shows job expressions that don’t evaluate properly and jobs -that don’t build.

- - -[% haveErrors = 0 %] - - -[% IF brokenJobsets && brokenJobsets.size > 0; haveErrors = 1 %] - -

Evaluation errors in jobsets

- - - - - - - - - - [% FOREACH j IN brokenJobsets %] - - - - - [% END %] - -
NameError
[% INCLUDE renderFullJobsetName project=j.project.name jobset=j.name %] -
[% HTML.escape(j.errormsg) %]
-
- -[% END %] - - -[% IF brokenJobs && brokenJobs.size > 0; haveErrors = 1 %] - -

Evaluation errors in jobs

- - - - - - - - - - [% FOREACH j IN brokenJobs %] - - - - - [% END %] - -
NameError
[% INCLUDE renderFullJobName project=j.project.name jobset=j.jobset.name job=j.name %] -
[% HTML.escape(j.errormsg) %]
-
- -[% END %] - - -[% IF brokenBuilds && brokenBuilds.size > 0; haveErrors = 1 %] - -

Broken builds

- -[% INCLUDE renderBuildList builds=brokenBuilds showStatusChange=1 hideProjectName=project hideJobsetName=jobset hideJobName=job %] - -[% END %] - - -[% IF !haveErrors %] - -

There are currently no problems.

- -[% END %] - - -[% END %] diff --git a/src/root/topbar.tt b/src/root/topbar.tt index afc9f2b9..9899a37b 100644 --- a/src/root/topbar.tt +++ b/src/root/topbar.tt @@ -33,7 +33,6 @@
  • [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('project'), [project.name]) title = "Overview" %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('all'), [project.name]) title = "Latest builds" %] - [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('errors'), [project.name]) title = "Errors" %] [% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %] [% END %] [% END %] @@ -51,9 +50,6 @@ [% INCLUDE menuItem uri = c.uri_for(c.controller('Jobset').action_for('all'), [project.name, jobset.name]) title = "Latest builds" %] - [% INCLUDE menuItem - uri = c.uri_for(c.controller('Jobset').action_for('errors'), [project.name, jobset.name]) - title = "Errors" %] [% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'channel' 'latest') title = "Channel" %] [% END %] [% END %] @@ -68,9 +64,6 @@ [% INCLUDE menuItem uri = c.uri_for(c.controller('Job').action_for('all'), [project.name, jobset.name, job.name]) title = "Latest builds" %] - [% INCLUDE menuItem - uri = c.uri_for(c.controller('Job').action_for('errors'), [project.name, jobset.name, job.name]) - title = "Errors" %] [% INCLUDE menuItem uri = c.uri_for('/job' project.name jobset.name job.name 'channel' 'latest') title = "Channel" %] [% END %] [% END %]