Show whether a job still exists
[?]
Apr 8, 2014, 4:49 PM
JPTXSWBOYRZMQDAYCJZBXVABO6GFQQ3CFSLX4FPXKLIWURPEWKMACDependencies
- [2]
O757ISISRemove unused function - [3]
KSBB33REAdd a dashboard - [4]
XKXMU5PVEllipsize long jobset/job names to prevent bootstrap navbar breakage - [5]
Y6AHH4THRemove the logfile and logSize columns from the database - [6]
OZDDUMVPAutomatically chomp all [%...%] directives - [7]
ZH6B56XRTry harder to find build logs - [8]
PF72JKWQAdd a "My jobs" tab to the dashboard - [9]
ZB3JV52WAdd a "My jobsets" tab to the dashboard - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [*]
WGUKOIQZFix indentation
Change contents
- replacement in src/lib/Hydra/View/TT.pm at line 11
expose_methods => [qw/buildLogExists buildStepLogExists/]);expose_methods => [qw/buildLogExists buildStepLogExists jobExists/]); - edit in src/lib/Hydra/View/TT.pm at line 25
# Check whether the given job is a member of the most recent jobset# evaluation.sub jobExists {my ($self, $c, $job) = @_;my $latestEval = $job->jobset->jobsetevals->search({ hasnewbuilds => 1},{ rows => 1, order_by => ["id desc"] })->single;return 0 if !defined $latestEval; # can't happenreturn scalar($latestEval->builds->search({ job => $job->name })) != 0;} - replacement in src/root/dashboard.tt at line 25
<td>[% INCLUDE renderFullJobName project=j.job.get_column('project') jobset=j.job.get_column('jobset') job=j.job.name %]</td><td><span class="[% IF !jobExists(j.job) %]disabled-job[% END %]">[% INCLUDE renderFullJobName project=j.job.get_column('project') jobset=j.job.get_column('jobset') job=j.job.name %]</span></td> - edit in src/root/job.tt at line 8[13.1][13.1]
[% IF !jobExists(job) %]<div class="alert alert-warning">This job is not a member of the <ahref="[%c.uri_for('/jobset' project.name jobset.name'evals')%]">latest evaluation</a> of its jobset. This means it wasremoved or had an evaluation error.</div>[% END %]