Allow comparing an evaluation with an arbitrary other evaluation

The URI parameter "compare=..." can denote either an arbitrary
evaluation ID, or the name of a jobset in the same project.  In the
latter case, the comparison is made against the latest completed
evaluation of the specified jobset.
This commit is contained in:
Eelco Dolstra
2012-04-02 20:40:59 +02:00
parent 2f9153c640
commit 69e600da89
5 changed files with 47 additions and 17 deletions

View File

@ -38,10 +38,8 @@
[%- BLOCK renderFullJobsetName -%]
<tt>
[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]
</tt>
[% END %]
<tt>[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]</tt>
[%- END -%]
[%- BLOCK renderFullJobName -%]

View File

@ -3,7 +3,13 @@
<h1>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h1>
<!-- <p>Info on evaluation [% eval.id %]...<p> -->
[%- IF otherEval -%]
<p>Comparisons are relative to [% INCLUDE renderFullJobsetName
project=otherEval.jobset.project.name jobset=otherEval.jobset.name %]
evaluation <a href="[%
c.uri_for(c.controller('JobsetEval').action_for('view'),
[otherEval.id]) %]">[% otherEval.id %]</a>.</p>
[%- END -%]
[%- BLOCK renderSome -%]
[% size = builds.size; max = full ? size : 30; %]

View File

@ -4,9 +4,11 @@
<h1>Evaluations of Jobset <tt>[% INCLUDE renderLink
uri = c.uri_for(c.controller('Project').action_for('view'), [project.name])
title = project.name %]:[% jobset.name %]</tt></h1>
[% nrShown = evals.size > resultsPerPage ? resultsPerPage : evals.size %]
<p>Showing evaluations [% (page - 1) * resultsPerPage + 1 %] - [%
(page - 1) * resultsPerPage + evals.size %] out of [% total %].</p>
(page - 1) * resultsPerPage + nrShown %] out of [% total %].</p>
[% INCLUDE renderPager %]
@ -19,7 +21,7 @@
</tr>
</thead>
<tbody>
[% last = evals.size - 2; FOREACH n IN [0..last]; eval = evals.$n; m = n + 1; next = evals.$m; %]
[% last = nrShown - 1; FOREACH n IN [0..last]; eval = evals.$n; m = n + 1; next = evals.$m; %]
<tr>
<td><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]">[% eval.id %]</a>&nbsp;</td>
<td>[% INCLUDE renderDateTime timestamp = eval.timestamp %]&nbsp;</td>