forked from lix-project/hydra
* Added a page to quickly see all failed builds and failed evaluations
per project or jobset or job or globally.
This commit is contained in:
parent
bf2a5a2629
commit
607d5641b6
|
@ -14,6 +14,22 @@ sub jobstatus : Chained('get_builds') PathPart Args(0) {
|
|||
[joinWithResultInfo($c, $c->stash->{jobStatus})->all];
|
||||
}
|
||||
|
||||
|
||||
# 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} =
|
||||
[joinWithResultInfo($c, $c->stash->{jobStatus})->search({buildstatus => {'!=' => 0}})];
|
||||
}
|
||||
|
||||
|
||||
sub all : Chained('get_builds') PathPart {
|
||||
my ($self, $c, $page) = @_;
|
||||
|
|
|
@ -10,7 +10,8 @@ use Hydra::Helper::CatalystUtils;
|
|||
sub job : Chained('/') PathPart('job') CaptureArgs(3) {
|
||||
my ($self, $c, $projectName, $jobsetName, $jobName) = @_;
|
||||
|
||||
$c->stash->{job} = $c->model('DB::Jobs')->find({project => $projectName, jobset => $jobsetName, name => $jobName})
|
||||
$c->stash->{job_} = $c->model('DB::Jobs')->search({project => $projectName, jobset => $jobsetName, name => $jobName});
|
||||
$c->stash->{job} = $c->stash->{job_}->single
|
||||
or notFound($c, "Job $projectName:$jobsetName:$jobName doesn't exist.");
|
||||
$c->stash->{project} = $c->stash->{job}->project;
|
||||
$c->stash->{jobset} = $c->stash->{job}->jobset;
|
||||
|
@ -34,6 +35,7 @@ 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} =
|
||||
|
|
|
@ -15,7 +15,8 @@ sub jobset : Chained('/') PathPart('jobset') CaptureArgs(2) {
|
|||
|
||||
$c->stash->{project} = $project;
|
||||
|
||||
$c->stash->{jobset} = $project->jobsets->find({name => $jobsetName})
|
||||
$c->stash->{jobset_} = $project->jobsets->search({name => $jobsetName});
|
||||
$c->stash->{jobset} = $c->stash->{jobset_}->single
|
||||
or notFound($c, "Jobset $jobsetName doesn't exist.");
|
||||
}
|
||||
|
||||
|
@ -38,6 +39,8 @@ sub get_builds : Chained('jobset') 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} =
|
||||
|
|
|
@ -172,6 +172,8 @@ sub get_builds : Chained('project') 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;
|
||||
|
|
|
@ -242,6 +242,8 @@ 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";
|
||||
}
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
<a href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>[% END -%]
|
||||
|
||||
|
||||
[% BLOCK renderFullJobsetName %]
|
||||
<tt>
|
||||
[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]
|
||||
</tt>
|
||||
[% END %]
|
||||
|
||||
|
||||
[% BLOCK renderFullJobName %]
|
||||
<tt>
|
||||
[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]:[% INCLUDE renderJobName %]
|
||||
|
|
82
src/root/errors.tt
Normal file
82
src/root/errors.tt
Normal file
|
@ -0,0 +1,82 @@
|
|||
[% WRAPPER layout.tt title="Errors" %]
|
||||
[% PROCESS common.tt %]
|
||||
|
||||
<h1>Errors</h1>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
|
||||
[% haveErrors = 0 %]
|
||||
|
||||
|
||||
[% IF brokenJobsets && brokenJobsets.size > 0; haveErrors = 1 %]
|
||||
|
||||
<h2>Evaluation errors in jobsets</h2>
|
||||
|
||||
<table class="buildList tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Error</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tdata>
|
||||
[% FOREACH j IN brokenJobsets %]
|
||||
<tr>
|
||||
<td>[% INCLUDE renderFullJobsetName project=j.project.name jobset=j.name %]</td>
|
||||
<td>
|
||||
<pre class="multiLineMsg error">[% HTML.escape(j.errormsg) %]</pre>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tdata>
|
||||
</table>
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% IF brokenJobs && brokenJobs.size > 0; haveErrors = 1 %]
|
||||
|
||||
<h2>Evaluation errors in jobs</h2>
|
||||
|
||||
<table class="buildList tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Error</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tdata>
|
||||
[% FOREACH j IN brokenJobs %]
|
||||
<tr>
|
||||
<td>[% INCLUDE renderFullJobName project=j.project.name jobset=j.jobset.name job=j.name %]</td>
|
||||
<td>
|
||||
<pre class="multiLineMsg error">[% HTML.escape(j.errormsg) %]</pre>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tdata>
|
||||
</table>
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% IF brokenBuilds && brokenBuilds.size > 0; haveErrors = 1 %]
|
||||
|
||||
<h2>Broken builds</h2>
|
||||
|
||||
[% INCLUDE renderBuildList builds=brokenBuilds %]
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% IF !haveErrors %]
|
||||
|
||||
<p><strong>There are currently no problems.</strong></p>
|
||||
|
||||
[% END %]
|
||||
|
||||
|
||||
[% END %]
|
|
@ -37,6 +37,9 @@
|
|||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Root').action_for('jobstatus'))
|
||||
title = "Job status" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Root').action_for('errors'))
|
||||
title = "Errors" %]
|
||||
[% END %]
|
||||
|
||||
|
||||
|
@ -51,6 +54,9 @@
|
|||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Project').action_for('jobstatus'), [project.name])
|
||||
title = "Job status" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Project').action_for('errors'), [project.name])
|
||||
title = "Errors" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -66,6 +72,9 @@
|
|||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Jobset').action_for('jobstatus'), [project.name, jobset.name])
|
||||
title = "Job status" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Jobset').action_for('errors'), [project.name, jobset.name])
|
||||
title = "Errors" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -81,6 +90,9 @@
|
|||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Job').action_for('jobstatus'), [project.name, jobset.name, job.name])
|
||||
title = "Job status" %]
|
||||
[% INCLUDE makeLink
|
||||
uri = c.uri_for(c.controller('Job').action_for('errors'), [project.name, jobset.name, job.name])
|
||||
title = "Errors" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
|
Loading…
Reference in a new issue