Allow comparing an eval against the jobset one day/week/month before

[?]
Aug 28, 2013, 1:46 PM
QD3NI3JYFYPWNKGNOFGHEARQ6TUYNANW4JCFNRKHJR753FII76GAC

Dependencies

  • [2] NIAYAEM2 Add a button to compare a jobset eval against other jobsets
  • [3] U4TD3AIQ Add support for viewing jobset evaluations
  • [4] GXUWB5B7 Sort jobsets by name
  • [*] HQGXL4MX Add validation for project and jobset names
  • [*] DE2DNCOI Allow comparing an evaluation with an arbitrary other evaluation
  • [*] 6KIJX24R Get rid of unnecessary [%- and -%] tags

Change contents

  • edit in src/lib/Hydra/Controller/JobsetEval.pm at line 39
    [6.809]
    [6.809]
    } elsif ($compare =~ /^-(\d+)$/) {
    my $t = int($1);
    $eval2 = $c->stash->{jobset}->jobsetevals->find(
    { hasnewbuilds => 1, timestamp => {'<=', $eval->timestamp - $t} },
    { order_by => "timestamp desc", rows => 1});
  • replacement in src/root/jobset-eval.tt at line 7
    [2.200][2.200:274]()
    <li><a href="?">Preceding evaluation in the same jobset</tt></a></li>
    [2.200]
    [2.274]
    <li><a href="?">Preceding evaluation in this jobset</tt></a></li>
    <li class="divider"></li>
    <li><a href="?compare=-[% 24 * 60 * 60 %]">This jobset <strong>one day</strong> earlier</tt></a></li>
    <li><a href="?compare=-[% 7 * 24 * 60 * 60 %]">This jobset <strong>one week</strong> earlier</tt></a></li>
    <li><a href="?compare=-[% 31 * 24 * 60 * 60 %]">This jobset <strong>one month</strong> earlier</tt></a></li>
  • edit in src/root/jobset-eval.tt at line 26
    [7.1980]
    [8.5259]
    [% ELSE %]
    <div class="alert">Couldn't find an evaluation to compare to.</div>