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NCHUDVAC
SGNXIOI4SO56F4YCGVMGZZO3AYXGPDL4FL75RDXAK5Y22IYWPPAQC
7YBYT2LQML2PKEO6UO4444AGSASS664UCDXW2YO3ALB7THQHCEBQC
QTFVCDIFHTF36AGU4UGNCTWSHQYTM2KERXS26TPAJK7IDJHL7BVAC
QL55ECJ6KMMBUOWQ6LKSOVN7L43CH4S6SPE2AQ3VX3KSGC32RP4AC
$c->stash->{evals} = [ $c->stash->{jobset}->jobsetevals->search(
{ hasnewbuilds => 1 },
{ order_by => "id DESC"
, '+select' => # !!! Slow - should precompute this.
[ "(select count(*) from JobsetEvalMembers where eval = me.id)"
, "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 0))"
, "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 1))"
, "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 1 and b.buildStatus = 0))"
]
, '+as' => [ "nrBuilds", "nrScheduled", "nrFinished", "nrSucceeded" ]
, rows => 5
}
) ];
[% IF page * resultsPerPage < total %]
[<a href="[% "$baseUri?page="; (page + 1) %]">Next</a>]
[% END %]
[<a href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last</a>]
</p>
-->
[% END %]
[% BLOCK renderEvals %]
<table class="tablesorter table table-condensed table-striped">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th colspan='2'>Success</th>
</tr>
</thead>
<tbody>
[% 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> </td>
<td>[% INCLUDE renderDateTime timestamp = eval.timestamp %] </td>
<td align='right'>
<span class="label label-success">[% eval.get_column('nrSucceeded') %]</span>
<span class="label label-important">[% eval.get_column('nrBuilds') - eval.get_column('nrSucceeded') - eval.get_column('nrScheduled') %]</span>
[% IF eval.get_column('nrScheduled') > 0 %]
<span class="label">[% eval.get_column('nrScheduled') %]</span>
[% END %]
</td>
<td align='right'>
[% diff = eval.get_column('nrSucceeded') - next.get_column('nrSucceeded');
IF diff > 0 %]
<span class='label label-success'><strong>+[% diff %]</strong></span>
[% ELSIF diff < 0 && eval.get_column('nrScheduled') == 0 %]
<span class='label label-important'><strong>[% diff %]</strong></span>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
<table class="tablesorter table table-condensed table-striped">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th colspan='2'>Success</th>
</tr>
</thead>
<tbody>
[% 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> </td>
<td>[% INCLUDE renderDateTime timestamp = eval.timestamp %] </td>
<td align='right'>
<span class="label label-success">[% eval.get_column('nrSucceeded') %]</span>
<span class="label label-important">[% eval.get_column('nrBuilds') - eval.get_column('nrSucceeded') - eval.get_column('nrScheduled') %]</span>
[% IF eval.get_column('nrScheduled') > 0 %]
<span class="label">[% eval.get_column('nrScheduled') %]</span>
[% END %]
</td>
<td align='right'>
[% diff = eval.get_column('nrSucceeded') - next.get_column('nrSucceeded');
IF diff > 0 %]
<span class='label label-success'><strong>+[% diff %]</strong></span>
[% ELSIF diff < 0 && eval.get_column('nrScheduled') == 0 %]
<span class='label label-important'><strong>[% diff %]</strong></span>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% INCLUDE renderEvals %]
[% IF lastBuilds %]
<h2>Most recent builds</h2>
[% INCLUDE renderBuildList builds=lastBuilds hideProjectName=1 hideJobsetName=1 %]
[% END %]
<h2>Most recent evaluations</h2>
[% INCLUDE renderEvals nrShown=5 %]
<a href="c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name])" class="btn">All evaluations</a>
<br />
<br />
[% IF c.check_user_roles('admin') %]
<td>[% INCLUDE maybeButton uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, j.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %]
[% IF j.hidden %]
[% INCLUDE maybeButton uri = c.uri_for('/jobset' project.name j.name 'unhide') content = "Unhide" %]
[% ELSE %]
[% INCLUDE maybeButton uri = c.uri_for('/jobset' project.name j.name 'hide') content = "Hide" %]
[% END %]
</td>
[% END%]
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone jobset" %]
[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, j.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %]
[% IF j.hidden %]
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name j.name 'unhide') title = "Unhide" %]
[% ELSE %]
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name j.name 'hide') title = "Hide" %]
[% END %]