Add a ‘latest-finished’ action
[?]
Aug 12, 2013, 8:17 PM
CJRWFVKZVTU2FBPN4J7OVIHO5YVPLW2QUKISN4PCTLXSOABDIA2QCDependencies
- [2]
N4ODPYP7Job page: Remove channel tab - [3]
LZVO64YGMerge in the first bits of the API work - [4]
IHUZXOK2Reply 404 for requests for non-existent .narinfo. - [5]
IDT3SO3PGenerate *.narinfo files on the fly to support the binary cache substituter - [6]
HAI5TY47Make negative narinfo responses much smaller - [*]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [*]
BTUDUY6F* Provide some redirects to the latest successful build for a job (or - [*]
3PNG7NIBRemove trailing whitespace - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [*]
WGUKOIQZFix indentation
Change contents
- edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 117
$c->res->redirect($c->uri_for($c->controller('Build')->action_for("build"), [$latest->id], @rest));}# Redirect to the latest successful build in a finished evaluation# (i.e. an evaluation that has no unfinished builds).sub latest_finished : Chained('get_builds') PathPart('latest-finished') {my ($self, $c, @rest) = @_; - edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 127
my $latest = $c->stash->{allBuilds}->find({ finished => 1, buildstatus => 0 },{ order_by => ["id DESC"], rows => 1, join => ["jobsetevalmembers"], where => \"not exists (select 1 from jobsetevalmembers m2 join builds b2 on jobsetevalmembers.eval = m2.eval and m2.build = b2.id and b2.finished = 0)"});notFound($c, "There is no successful build to redirect to.") unless defined $latest; - replacement in src/lib/Hydra/Controller/Root.pm at line 286
$c->response->status(404);$c->response->status(404); - edit in src/root/job.tt at line 27[2.194][13.1366]
<li><a href="[% c.uri_for('/job' project.name jobset.name job.name 'latest-finished') %]">Latest successful build from a finished evaluation</a></li>