forked from lix-project/hydra
hydra: add status icon per jobset on project page
This commit is contained in:
parent
ef34de7603
commit
e2be1adc22
|
@ -14,7 +14,7 @@ sub project : Chained('/') PathPart('project') CaptureArgs(1) {
|
|||
or notFound($c, "Project $projectName doesn't exist.");
|
||||
|
||||
$c->stash->{project} = $project;
|
||||
$c->stash->{jobsets} = [$project->jobsets->search({},{ order_by => "name" })];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,15 @@ sub view : Chained('project') PathPart('') Args(0) {
|
|||
#getBuildStats($c, scalar $c->stash->{project}->builds);
|
||||
|
||||
$c->stash->{views} = [$c->stash->{project}->views->all];
|
||||
$c->stash->{jobsets} = [$c->stash->{project}->jobsets->search({},
|
||||
{ order_by => "name"
|
||||
, "+select" => [
|
||||
"(SELECT COUNT(*) FROM Builds AS a NATURAL JOIN BuildSchedulingInfo WHERE me.project = a.project AND me.name = a.jobset AND a.isCurrent = 1 )"
|
||||
, "(SELECT COUNT(*) FROM Builds AS a NATURAL JOIN BuildResultInfo WHERE me.project = a.project AND me.name = a.jobset AND buildstatus <> 0 AND a.isCurrent = 1 )"
|
||||
, "(SELECT COUNT(*) FROM Builds AS a NATURAL JOIN BuildResultInfo WHERE me.project = a.project AND me.name = a.jobset AND buildstatus = 0 AND a.isCurrent = 1 )"
|
||||
]
|
||||
, "+as" => ["nrscheduled", "nrfailed", "nrsucceeded"]
|
||||
})];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[% WRAPPER layout.tt title=(edit ? (create ? "New Project" : "Editing Project ‘$project.name’") : "Project ‘$project.name’") %]
|
||||
[% PROCESS common.tt %]
|
||||
|
||||
[% IF create %]
|
||||
<h1>New Project</h1>
|
||||
[% ELSE %]
|
||||
|
@ -31,6 +30,7 @@
|
|||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Id</th>
|
||||
<th>Description</th>
|
||||
<th>Last evaluated</th>
|
||||
|
@ -40,6 +40,17 @@
|
|||
[% FOREACH j IN jobsets %]
|
||||
<tr class="clickable [% IF odd %] odd [% END; odd = !odd %]"
|
||||
onclick="window.location = '[% c.uri_for('/jobset' project.name j.name) %]'">
|
||||
<td>
|
||||
[% IF j.get_column('nrscheduled') > 0 %]
|
||||
<img src="/static/images/question-mark.png" alt="Scheduled" />
|
||||
[% ELSIF j.get_column('nrfailed') == 0 %]
|
||||
<img src="/static/images/success.gif" alt="Succeeded" />
|
||||
[% ELSIF j.get_column('nrfailed') > 0 && j.get_column('nrsucceeded') > 0 %]
|
||||
<img src="/static/images/failure-some.gif" alt="Some Failed" />
|
||||
[% ELSE %]
|
||||
<img src="/static/images/failure.gif" alt="All Failed" />
|
||||
[% END %]
|
||||
</td>
|
||||
<td>[% INCLUDE renderJobsetName project = project.name jobset = j.name %]</td>
|
||||
<td>[% HTML.escape(j.description) %]</td>
|
||||
<td>[% INCLUDE renderDateTime timestamp = j.lastcheckedtime %]</td>
|
||||
|
|
BIN
src/root/static/images/failure-some.gif
Normal file
BIN
src/root/static/images/failure-some.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 215 B |
Loading…
Reference in a new issue