Show whether a job still exists

[?]
Apr 8, 2014, 4:49 PM
JPTXSWBOYRZMQDAYCJZBXVABO6GFQQ3CFSLX4FPXKLIWURPEWKMAC

Dependencies

  • [2] O757ISIS Remove unused function
  • [3] KSBB33RE Add a dashboard
  • [4] ZB3JV52W Add a "My jobsets" tab to the dashboard
  • [5] XKXMU5PV Ellipsize long jobset/job names to prevent bootstrap navbar breakage
  • [6] PF72JKWQ Add a "My jobs" tab to the dashboard
  • [7] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [8] OZDDUMVP Automatically chomp all [%...%] directives
  • [9] ZH6B56XR Try harder to find build logs
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [*] WGUKOIQZ Fix indentation

Change contents

  • replacement in src/lib/Hydra/View/TT.pm at line 11
    [4.41][2.0:64]()
    expose_methods => [qw/buildLogExists buildStepLogExists/]);
    [4.41]
    [4.2156]
    expose_methods => [qw/buildLogExists buildStepLogExists jobExists/]);
  • edit in src/lib/Hydra/View/TT.pm at line 25
    [4.169]
    [11.6919]
    # 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 happen
    return scalar($latestEval->builds->search({ job => $job->name })) != 0;
    }
  • replacement in src/root/dashboard.tt at line 25
    [3.6220][3.6220:6360]()
    <td>[% INCLUDE renderFullJobName project=j.job.get_column('project') jobset=j.job.get_column('jobset') job=j.job.name %]</td>
    [3.6220]
    [3.6360]
    <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 <a
    href="[%c.uri_for('/jobset' project.name jobset.name
    'evals')%]">latest evaluation</a> of its jobset. This means it was
    removed or had an evaluation error.</div>
    [% END %]