Tabify the eval page

[?]
Aug 28, 2013, 3:06 PM
4QCXGR4WEQHBUNOKGLH7VOUF7RWGZJHVSQDZB3I7ZXQX2DRSHLGAC

Dependencies

  • [2] 2P7VNAAC Move common Javascript code into a separate file
  • [3] 2S7UHICM Allow filtering jobs in eval pages
  • [4] 3PNG7NIB Remove trailing whitespace
  • [5] W74RIXTJ Show inputs and input changes on the jobset eval page
  • [6] L7NUCXKS Show new and removed jobs
  • [7] KQZQI2WN Allow creating a release from an evaluation
  • [8] 37RKEEMP Don't use colspan=0, it doesn't work in all browsers
  • [9] WZZOOYCH Show queued builds in jobset evaluation pages
  • [10] U4TD3AIQ Add support for viewing jobset evaluations

Change contents

  • edit in src/root/jobset-eval.tt at line 30
    [4.5046]
    [4.1510]
    <form class="form-search">
    <input name="filter" type="text" class="input-large search-query" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]/>
    <input name="compare" type="hidden" [% HTML.attributes(value => otherEval.id) %]/>
    <input name="full" type="hidden" [% HTML.attributes(value => full) %]/>
    </form>
  • replacement in src/root/jobset-eval.tt at line 37
    [4.1536][4.1536:1618]()
    <li class="active"><a href="#tabs-status" data-toggle="tab">Job status</a></li>
    [4.1536]
    [4.1618]
    [% IF nowFail.size > 0 %]
    <li><a href="#tabs-now-fail" data-toggle="tab"><span class="text-warning">Newly-failing jobs</span></a></li>
    [% END %]
    [% IF nowSucceed.size > 0 %]
    <li><a href="#tabs-now-succeed" data-toggle="tab"><span class="text-success">Newly-succeeding jobs</span></a></li>
    [% END %]
    [% IF new.size > 0 %]
    <li><a href="#tabs-new" data-toggle="tab">New jobs</a></li>
    [% END %]
    [% IF removed.size > 0 %]
    <li><a href="#tabs-removed" data-toggle="tab">Removed jobs</a></li>
    [% END %]
    [% IF stillFail.size > 0 %]
    <li><a href="#tabs-still-fail" data-toggle="tab">Still-failing jobs</a></li>
    [% END %]
    [% IF stillSucceed.size > 0 %]
    <li><a href="#tabs-still-succeed" data-toggle="tab">Still-succeeding jobs</a></li>
    [% END %]
    [% IF unfinished.size > 0 %]
    <li><a href="#tabs-unfinished" data-toggle="tab">Queued jobs</a></li>
    [% END %]
  • edit in src/root/jobset-eval.tt at line 61
    [4.5496]
    [4.1688]
    [% BLOCK renderSome %]
    [% INCLUDE renderBuildListHeader unsortable=1 %]
    [% size = builds.size; max = full ? size : 250; %]
    [% INCLUDE renderBuildListBody builds=builds.slice(0, (size > max ? max : size) - 1)
    hideProjectName=1 hideJobsetName=1 %]
    [% IF size > max; params = c.req.params; params.full = 1 %]
    <tr><td class="centered" colspan="6"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], params) %]"><em>([% size - max %] more builds omitted)</em></a></td></tr>
    [% END %]
    [% INCLUDE renderBuildListFooter %]
    [% END %]
  • replacement in src/root/jobset-eval.tt at line 74
    [4.251][4.1715:1764]()
    <div id="tabs-status" class="tab-pane active">
    [4.251]
    [3.367]
    <div id="tabs-now-fail" class="tab-pane">
    [% INCLUDE renderSome builds=nowFail %]
    </div>
  • replacement in src/root/jobset-eval.tt at line 78
    [3.368][3.368:728]()
    <form class="form-search">
    <input name="filter" type="text" class="input-large search-query" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]/>
    <input name="compare" type="hidden" [% HTML.attributes(value => otherEval.id) %]/>
    <input name="full" type="hidden" [% HTML.attributes(value => full) %]/>
    </form>
    [3.368]
    [4.518]
    <div id="tabs-now-succeed" class="tab-pane">
    [% INCLUDE renderSome builds=nowSucceed %]
    </div>
  • replacement in src/root/jobset-eval.tt at line 82
    [4.519][4.1765:2281]()
    [% BLOCK renderSome %]
    [% size = builds.size; max = full ? size : 30; %]
    [% INCLUDE renderBuildListBody builds=builds.slice(0, (size > max ? max : size) - 1)
    hideProjectName=1 hideJobsetName=1 %]
    [% IF size > max; params = c.req.params; params.full = 1 %]
    <tr><td class="centered" colspan="6"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], params) %]"><em>([% size - max %] more builds omitted)</em></a></td></tr>
    [% END %]
    [% END %]
    [4.519]
    [4.665]
    <div id="tabs-new" class="tab-pane">
    [% INCLUDE renderSome builds=new %]
    </div>
  • replacement in src/root/jobset-eval.tt at line 86
    [4.666][4.2282:2335](),[4.1036][4.5545:5546](),[4.2335][4.5545:5546](),[4.5545][4.5545:5546](),[4.5546][4.2336:2515](),[4.2515][4.5712:5713](),[4.5712][4.5712:5713](),[4.5713][4.2516:2678](),[4.2678][4.23915:23916](),[4.5888][4.23915:23916](),[4.23916][4.2679:3452](),[4.3452][4.6063:6064](),[4.6063][4.6063:6064](),[4.6064][4.3453:3633](),[4.3633][4.6245:6246](),[4.6245][4.6245:6246](),[4.6246][4.3634:3823]()
    [% INCLUDE renderBuildListHeader unsortable=1 %]
    [% IF unfinished.size > 0 %]
    <tr><th class="subheader" colspan="6"><strong>Queued</strong> jobs</th></tr>
    [% INCLUDE renderSome builds=unfinished %]
    [% END %]
    [% IF new.size > 0 %]
    <tr><th class="subheader" colspan="6"><strong>New</strong> jobs</th></tr>
    [% INCLUDE renderSome builds=new %]
    [% END %]
    [% IF removed.size > 0 %]
    <tr><th class="subheader" colspan="6"><strong>Removed</strong> jobs</th></tr>
    [% size = removed.size; max = full ? size : 30; %]
    [% FOREACH j IN removed.slice(0,(size > max ? max : size) - 1) %]
    <tr>
    <td colspan="2"></td>
    <td colspan="2">[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %]</td>
    <td colspan="2"><tt>[% j.system %]</tt></td>
    </tr>
    [% END %]
    [% IF size > max; params = c.req.params; params.full = 1 %]
    <tr><td class="centered" colspan="6"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], params) %]"><em>([% size - max %] more jobs omitted)</em></a></td></tr>
    [% END %]
    [% END %]
    [% IF nowFail.size > 0 %]
    <tr><th class="subheader" colspan="6">Jobs that now <strong>fail</strong></th></tr>
    [% INCLUDE renderSome builds=nowFail %]
    [% END %]
    [% IF nowSucceed.size > 0 %]
    <tr><th class="subheader" colspan="6">Jobs that now <strong>succeed</strong></th></tr>
    [% INCLUDE renderSome builds=nowSucceed %]
    [% END %]
    [4.666]
    [4.976]
    <div id="tabs-removed" class="tab-pane">
    <table class="table table-striped table-condensed clickable-rows">
    <thead>
    <tr><th>Job</th><th>System</th></tr>
    </thead>
    <tbody>
    [% size = removed.size; max = full ? size : 250; %]
    [% FOREACH j IN removed.slice(0,(size > max ? max : size) - 1) %]
    <tr>
    <td>[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %]</td>
    <td><tt>[% j.system %]</tt></td>
    </tr>
    [% END %]
    [% IF size > max; params = c.req.params; params.full = 1 %]
    <tr><td class="centered" colspan="2"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], params) %]"><em>([% size - max %] more jobs omitted)</em></a></td></tr>
    [% END %]
    </tbody>
    </table>
    </div>
  • replacement in src/root/jobset-eval.tt at line 106
    [4.977][4.3824:4010]()
    [% IF stillFail.size > 0 %]
    <tr><th class="subheader" colspan="6">Jobs that still <strong>fail</strong></th></tr>
    [% INCLUDE renderSome builds=stillFail %]
    [% END %]
    [4.977]
    [4.4010]
    <div id="tabs-still-fail" class="tab-pane">
    [% INCLUDE renderSome builds=stillFail %]
    </div>
  • replacement in src/root/jobset-eval.tt at line 110
    [4.4011][4.4011:4206]()
    [% IF stillSucceed.size > 0 %]
    <tr><th class="subheader" colspan="6">Jobs that still <strong>succeed</strong></th></tr>
    [% INCLUDE renderSome builds=stillSucceed %]
    [% END %]
    [4.4011]
    [4.4206]
    <div id="tabs-still-succeed" class="tab-pane">
    [% INCLUDE renderSome builds=stillSucceed %]
    </div>
  • replacement in src/root/jobset-eval.tt at line 114
    [4.4207][4.4207:4283](),[4.4283][3.729:846](),[3.846][4.4398:4422](),[4.4398][4.4398:4422]()
    [% INCLUDE renderBuildListFooter %]
    [% IF c.user_exists %]
    <p>
    <a class="btn" href="[% c.uri_for(c.controller('JobsetEval').action_for('release'), [eval.id]) %]">Release</a>
    </p>
    [% END %]
    [4.4207]
    [4.4422]
    <div id="tabs-unfinished" class="tab-pane">
    [% INCLUDE renderSome builds=unfinished %]
  • edit in src/root/static/js/common.js at line 53
    [2.1682][2.1682:2005]()
    /* Ensure that pressing the back button on another page
    navigates back to the previously selected tab on this
    page. */
    $('.nav-tabs').bind('show', function(e) {
    var pattern = /#.+/gi;
    var id = e.target.toString().match(pattern)[0];
    history.replaceState(null, "", id);
    });
  • replacement in src/root/static/js/common.js at line 55
    [2.2060][2.2060:2134]()
    $(".nav a[href='" + window.location.hash + "']").tab('show');
    [2.2060]
    [2.2134]
    $(".nav-tabs a[href='" + window.location.hash + "']").tab('show');
  • edit in src/root/static/js/common.js at line 57
    [2.2144]
    [2.2144]
    /* If no tab is active, show the first one. */
    $(".nav-tabs").each(function() {
    if ($("li.active", this).length > 0) return;
    $("a", $("li", this).first()).tab('show');
    });
    /* Ensure that pressing the back button on another page
    navigates back to the previously selected tab on this
    page. */
    $('.nav-tabs').bind('show', function(e) {
    var pattern = /#.+/gi;
    var id = e.target.toString().match(pattern)[0];
    history.replaceState(null, "", id);
    });