1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-18 17:02:28 -04:00

Also show number of evaluations of which a build is a part

This commit is contained in:
Eelco Dolstra 2013-02-21 18:42:18 +01:00
parent edbe531ccc
commit c6fe9f00bf
2 changed files with 10 additions and 6 deletions

View file

@ -92,6 +92,7 @@ sub view_build : Chained('build') PathPart('') Args(0) {
} }
# Get the first eval of which this build was a part. # Get the first eval of which this build was a part.
($c->stash->{nrEvals}) = $c->stash->{build}->jobsetevals->search({ hasnewbuilds => 1 })->count;
($c->stash->{eval}) = $c->stash->{build}->jobsetevals->search( ($c->stash->{eval}) = $c->stash->{build}->jobsetevals->search(
{ hasnewbuilds => 1}, { hasnewbuilds => 1},
{ limit => 1, order_by => ["id"] }); { limit => 1, order_by => ["id"] });

View file

@ -97,12 +97,6 @@
<th>System:</th> <th>System:</th>
<td><tt>[% build.system %]</tt></td> <td><tt>[% build.system %]</tt></td>
</tr> </tr>
[% IF eval %]
<tr>
<th>Part of:</th>
<td><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]">evaluation [% eval.id %]</a></td>
</tr>
[% END %]
[% IF build.releasename %] [% IF build.releasename %]
<tr> <tr>
<th>Release name:</th> <th>Release name:</th>
@ -114,6 +108,15 @@
<td><tt>[% build.nixname %]</tt></td> <td><tt>[% build.nixname %]</tt></td>
</tr> </tr>
[% END %] [% END %]
[% IF eval %]
<tr>
<th>Part of:</th>
<td>
<a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]">evaluation [% eval.id %]</a>
[% IF nrEvals > 1 +%] (and [% nrEvals - 1 %] others)[% END %]
</td>
</tr>
[% END %]
[% IF build.iscachedbuild %] [% IF build.iscachedbuild %]
<tr> <tr>
<th>Cached from:</th> <th>Cached from:</th>