Replace last 5 builds on jobset page with last 5 evaluations. Moved hide/unhide and evaluate options to jobset topmenu.

[?]
Apr 13, 2012, 9:26 AM
Q4VDOA762MDHLJKNJMPLHFYRRACCT3DQXF66ZTVMETZCR52B72OQC

Dependencies

  • [2] N45RZUQ6 Reduce I/O in build listings by only fetching required columns
  • [3] DE2DNCOI Allow comparing an evaluation with an arbitrary other evaluation
  • [4] GEL2WHSU Move channel link to top menu of Project and Jobset.
  • [5] 22JB5HNE make changes section more compact/readable
  • [6] AKAXJDMW * Disable the statistics on the project, jobset and job pages for now
  • [7] QTFVCDIF added hide feature for project/jobset
  • [8] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [9] SGNXIOI4 Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only)
  • [10] L7NUCXKS Show new and removed jobs
  • [11] PPER7HEB Fix pager prev/next button.
  • [12] Y4YGGXF6 Remove pagers on the bottom of paginated lists.
  • [13] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [14] 3HZY24CX * Make jobsets viewable under
  • [15] J7EE2XZA Fix a huge performance regression in the jobstatus page
  • [16] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [17] G5YSUSNZ In build tables, hide the project, jobset and/or job name if they're constant
  • [18] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra
  • [19] TJPIS3UP hydra: minor improvements in hydra ui
  • [20] PC6UOHH7 add some stats to jobsets in project view
  • [21] ELABMHJI * hydra: layout changes
  • [22] CVWQXYKM use newer icons consistently
  • [23] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [24] UMFB2767 Hydra/64: Leaving number of builds empty gives DBIx error
  • [25] JXPHAZMV Minor style changes
  • [26] 6QRHXIM3 * Speed up the jobset index page. Especially the query to get the
  • [27] U4TD3AIQ Add support for viewing jobset evaluations
  • [*] IK53RV4V
  • [*] 7YBYT2LQ

Change contents

  • edit in src/lib/Hydra/Controller/Jobset.pm at line 28
    [5.271][5.2:3](),[5.3][5.58:118](),[5.276][5.58:118]()
    #getBuildStats($c, scalar $c->stash->{jobset}->builds);
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 51
    [5.838]
    [5.4]
    $c->stash->{evals} = [ $c->stash->{jobset}->jobsetevals->search(
    { hasnewbuilds => 1 },
    { order_by => "id DESC"
    , '+select' => # !!! Slow - should precompute this.
    [ "(select count(*) from JobsetEvalMembers where eval = me.id)"
    , "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 0))"
    , "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 1))"
    , "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 1 and b.buildStatus = 0))"
    ]
    , '+as' => [ "nrBuilds", "nrScheduled", "nrFinished", "nrSucceeded" ]
    , rows => 5
    }
    ) ];
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 95
    [5.11][5.314:344](),[5.1387][5.345:376](),[5.376][5.4074:4133](),[5.4133][2.269:361]()
    # Last builds for jobset.
    $c->stash->{lastBuilds} =
    [ $c->stash->{jobset}->builds->search({ finished => 1 },
    { order_by => "timestamp DESC", rows => 5, columns => [@buildListColumns] }) ];
  • edit in src/root/common.tt at line 402
    [5.3461][5.3461:3466](),[5.3466][5.4504:4508](),[5.4504][5.4504:4508](),[5.4508][5.3467:3470](),[5.3470][5.4554:4630](),[5.4554][5.4554:4630]()
    <!--
    <p>
    []
    [% IF page > 1 %]
    [<a href="[% "$baseUri?page="; (page - 1) %]">Prev</a>]
  • replacement in src/root/common.tt at line 403
    [5.4640][5.4640:4832](),[5.4832][5.3471:3475](),[5.3475][5.4832:4842](),[5.4832][5.4832:4842]()
    [% IF page * resultsPerPage < total %]
    [<a href="[% "$baseUri?page="; (page + 1) %]">Next</a>]
    [% END %]
    [<a href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last</a>]
    </p>
    -->
    [% END %]
    [5.4640]
    [5.2630]
    [% BLOCK renderEvals %]
    <table class="tablesorter table table-condensed table-striped">
    <thead>
    <tr>
    <th>#</th>
    <th>Date</th>
    <th colspan='2'>Success</th>
    </tr>
    </thead>
    <tbody>
    [% last = nrShown - 1; FOREACH n IN [0..last]; eval = evals.$n; m = n + 1; next = evals.$m; %]
    <tr>
    <td><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]">[% eval.id %]</a>&nbsp;</td>
    <td>[% INCLUDE renderDateTime timestamp = eval.timestamp %]&nbsp;</td>
    <td align='right'>
    <span class="label label-success">[% eval.get_column('nrSucceeded') %]</span>
    <span class="label label-important">[% eval.get_column('nrBuilds') - eval.get_column('nrSucceeded') - eval.get_column('nrScheduled') %]</span>
    [% IF eval.get_column('nrScheduled') > 0 %]
    <span class="label">[% eval.get_column('nrScheduled') %]</span>
    [% END %]
    </td>
    <td align='right'>
    [% diff = eval.get_column('nrSucceeded') - next.get_column('nrSucceeded');
    IF diff > 0 %]
    <span class='label label-success'><strong>+[% diff %]</strong></span>
    [% ELSIF diff < 0 && eval.get_column('nrScheduled') == 0 %]
    <span class='label label-important'><strong>[% diff %]</strong></span>
    [% END %]
    </td>
    </tr>
    [% END %]
    </tbody>
    </table>
  • edit in src/root/common.tt at line 441
    [5.2632]
    [% END %]
  • replacement in src/root/jobset-eval.tt at line 4
    [5.4906][5.430:517]()
    <h1>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h1>
    [5.4906]
    [5.4993]
    <h2>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h2>
  • replacement in src/root/jobset-evals.tt at line 4
    [5.6444][5.6444:6496]()
    <h1>Evaluations of Jobset <tt>[% INCLUDE renderLink
    [5.6444]
    [5.6496]
    <h2>Evaluations of Jobset <tt>[% INCLUDE renderLink
  • replacement in src/root/jobset-evals.tt at line 6
    [5.6574][5.6574:6628]()
    title = project.name %]:[% jobset.name %]</tt></h1>
    [5.6574]
    [3.1993]
    title = project.name %]:[% jobset.name %]</tt></h2>
  • replacement in src/root/jobset-evals.tt at line 15
    [5.6793][5.4208:4272](),[5.4272][5.6821:6943](),[5.6821][5.6821:6943](),[5.6943][3.2135:2234](),[3.2234][5.7045:7283](),[5.7045][5.7045:7283](),[5.7283][5.4273:4512](),[5.4512][5.7365:7411](),[5.7365][5.7365:7411](),[5.7411][5.4513:4579](),[5.4579][5.7466:7614](),[5.7466][5.7466:7614](),[5.7614][5.4580:4655](),[5.4655][5.7675:7737](),[5.7675][5.7675:7737](),[5.7737][5.4656:4732](),[5.4732][5.7795:7865](),[5.7795][5.7795:7865]()
    <table class="tablesorter table table-condensed table-striped">
    <thead>
    <tr>
    <th>#</th>
    <th>Date</th>
    <th colspan='2'>Success</th>
    </tr>
    </thead>
    <tbody>
    [% last = nrShown - 1; FOREACH n IN [0..last]; eval = evals.$n; m = n + 1; next = evals.$m; %]
    <tr>
    <td><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]">[% eval.id %]</a>&nbsp;</td>
    <td>[% INCLUDE renderDateTime timestamp = eval.timestamp %]&nbsp;</td>
    <td align='right'>
    <span class="label label-success">[% eval.get_column('nrSucceeded') %]</span>
    <span class="label label-important">[% eval.get_column('nrBuilds') - eval.get_column('nrSucceeded') - eval.get_column('nrScheduled') %]</span>
    [% IF eval.get_column('nrScheduled') > 0 %]
    <span class="label">[% eval.get_column('nrScheduled') %]</span>
    [% END %]
    </td>
    <td align='right'>
    [% diff = eval.get_column('nrSucceeded') - next.get_column('nrSucceeded');
    IF diff > 0 %]
    <span class='label label-success'><strong>+[% diff %]</strong></span>
    [% ELSIF diff < 0 && eval.get_column('nrScheduled') == 0 %]
    <span class='label label-important'><strong>[% diff %]</strong></span>
    [% END %]
    </td>
    </tr>
    [% END %]
    </tbody>
    </table>
    [5.6793]
    [5.7892]
    [% INCLUDE renderEvals %]
  • replacement in src/root/jobset.tt at line 94
    [5.904][5.20547:20606](),[5.20547][5.20547:20606](),[5.20606][5.691:780](),[5.780][5.20660:20675](),[5.20660][5.20660:20675]()
    [% IF lastBuilds %]
    <h2>Most recent builds</h2>
    [% INCLUDE renderBuildList builds=lastBuilds hideProjectName=1 hideJobsetName=1 %]
    [% END %]
    [5.904]
    [5.20675]
    <h2>Most recent evaluations</h2>
    [% INCLUDE renderEvals nrShown=5 %]
    <a href="c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name])" class="btn">All evaluations</a>
    <br />
    <br />
  • edit in src/root/project.tt at line 31
    [5.249][5.775:854]()
    [% IF c.check_user_roles('admin') %]<th>Options</th>[% END%]
  • edit in src/root/project.tt at line 78
    [5.1343][5.855:910](),[5.910][5.9448:9886](),[5.9886][5.3674:3712](),[5.3674][5.3674:3712](),[5.3712][5.9887:10014](),[5.10014][5.3837:3873](),[5.3837][5.3837:3873](),[5.3896][5.3896:3922](),[5.3922][5.1180:1207](),[5.1180][5.1180:1207]()
    [% IF c.check_user_roles('admin') %]
    <td>[% INCLUDE maybeButton uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, j.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %]
    [% IF j.hidden %]
    [% INCLUDE maybeButton uri = c.uri_for('/jobset' project.name j.name 'unhide') content = "Unhide" %]
    [% ELSE %]
    [% INCLUDE maybeButton uri = c.uri_for('/jobset' project.name j.name 'hide') content = "Hide" %]
    [% END %]
    </td>
    [% END%]
  • edit in src/root/topbar.tt at line 47
    [5.11384][5.11384:11512]()
    [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('releases'), [project.name]) title = "Releases" %]
  • edit in src/root/topbar.tt at line 50
    [5.11892]
    [4.0]
    <li class="divider"></li>
    [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('releases'), [project.name]) title = "Releases" %]
  • edit in src/root/topbar.tt at line 79
    [5.13133]
    [4.117]
    <li class="divider"></li>
  • edit in src/root/topbar.tt at line 83
    [5.13212]
    [5.13212]
    [% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone jobset" %]
  • replacement in src/root/topbar.tt at line 85
    [5.13324][5.13324:13438]()
    [% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone jobset" %]
    [5.13324]
    [5.13438]
    [% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, j.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ j.name _ "?") %]
    [% IF j.hidden %]
    [% INCLUDE menuItem uri = c.uri_for('/jobset' project.name j.name 'unhide') title = "Unhide" %]
    [% ELSE %]
    [% INCLUDE menuItem uri = c.uri_for('/jobset' project.name j.name 'hide') title = "Hide" %]
    [% END %]
  • edit in src/root/topbar.tt at line 92
    [5.13454]
    [5.13454]