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SSKFUPJ7IC2MCGDVFGAC
LQNBKF3DKVYK3NPDGK7OLOTIWIF4HR3EKLRYNLZJB4G3NMIVBCEAC
$c->stash->{allBuilds} = [$c->model('DB::Builds')->search(
{finished => 1}, {order_by => "timestamp DESC"})];
# Get the latest finished build for each unique job.
$c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef,
{ join => 'resultInfo'
, where => "finished != 0 and timestamp = (select max(timestamp) from Builds " .
"where project == me.project and attrName == me.attrName and finished != 0 and system == me.system)"
, order_by => "project, attrname, system"
})];
}
sub jobstatus :Local {
my ($self, $c) = @_;
$c->stash->{template} = 'jobstatus.tt';
# Get the latest finished build for each unique job.
$c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef,
{ join => 'resultInfo'
, where => "finished != 0 and timestamp = (select max(timestamp) from Builds " .
"where project == me.project and attrName == me.attrName and finished != 0 and system == me.system)"
, order_by => "project, attrname, system"
})];
}
sub all :Local {
my ($self, $c, $page) = @_;
$c->stash->{template} = 'all.tt';
$page = int($page) || 1;
my $resultsPerPage = 50;
my $nrBuilds = scalar($c->model('DB::Builds')->search({finished => 1}));
$c->stash->{page} = $page;
$c->stash->{resultsPerPage} = $resultsPerPage;
$c->stash->{totalBuilds} = $nrBuilds;
$c->stash->{builds} = [$c->model('DB::Builds')->search(
{finished => 1}, {order_by => "timestamp DESC", rows => $resultsPerPage, page => $page})];
[% WRAPPER layout.tt title="All Builds" %]
[% PROCESS common.tt %]
<h1>All Builds</h1>
<p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %]
out of [% totalBuilds %] in order of descending timestamp.</p>
[% PROCESS renderBuildList %]
[<a href="[% c.uri_for('/all' 1) %]">First</a>]
[% IF page > 1 %]
[<a href="[% c.uri_for('/all' (page - 1)) %]">Prev</a>]
[% END %]
[% IF page * resultsPerPage < totalBuilds %]
[<a href="[% c.uri_for('/all' (page + 1)) %]">Next</a>]
[% END %]
[<a href="[% c.uri_for('/all' (totalBuilds - 1) div resultsPerPage + 1) %]">Last</a>]
[% END %]
<h2>Job status</h2>
<p>Below are the latest builds for each job.</p>
[% PROCESS renderBuildList builds=latestBuilds %]
<h2>All builds</h2>
<p>Number of builds: [% allBuilds.size %]</p>
[% PROCESS renderBuildList builds=allBuilds %]
[% WRAPPER layout.tt title="Job Status" %]
[% PROCESS common.tt %]
<h1>Job Status</h1>
<p>Below are the latest builds for each job.</p>
[% PROCESS renderBuildList builds=latestBuilds %]
[% END %]
[% IF jobNames && jobNames.size > 0 %]
<ul>
[% FOREACH jobName IN jobNames -%]
<li><a href="[% c.uri_for('/job' curProject.name jobName.attrname) %]"><tt>[% jobName.attrname %]</tt></a></li>
[% END %]
</ul>
[% ELSE %]
<p>No builds have been performed or scheduled.</p>
[% END %]
<h2>Statistics</h2>
[% PROCESS showBuildStats %]
[% END %]