Integrate the "Job status" and "All jobs" tabs

[?]
Aug 28, 2013, 12:22 PM
D7X6XTKQVG7SQTAIQ24SOVT6YHBHFKXDXB5GBPII6VK3CB4MYNTQC

Dependencies

  • [2] M4TBFHHJ "limit" -> "rows"
  • [3] XU4PKY3U By default, show the first 250 jobs only
  • [4] JY7BXXOP Split viewing and editing a project
  • [5] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [6] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [7] UMFB2767 Hydra/64: Leaving number of builds empty gives DBIx error
  • [8] SZYDW2DG hydra: added some user admin
  • [9] XDDCO6CH * hydra: add dependency list with links to logfiles
  • [10] XL43MFDO Show visual feedback that the filter is being applied
  • [11] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [12] OX6NYJDV Split viewing and editing a jobset
  • [13] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [14] 3PNG7NIB Remove trailing whitespace
  • [15] OR5SJ42Y Show releases in a tab on the project page
  • [16] 6QRHXIM3 * Speed up the jobset index page. Especially the query to get the
  • [17] 36M6DGIT Show the runtime/build dependencies in the build page
  • [18] QTC3SYBM Jobset page: Load the jobs and status tabs on demand
  • [19] HZWUT4YN Allow users to reproduce builds on their own systems
  • [20] 64IV56HI Replace bootstrap tarball
  • [21] TFK74CQR Put job status on a separate tab
  • [22] JOVVHIJX Remove all entry points to modify machines
  • [23] UICHT2PS Add a search feature
  • [24] KXGOUX7P * Creating releases.
  • [25] RSEGBU6C Hydra/20: Jobset clone feature
  • [26] 225GEK4N After editing a project/jobset, redirect back to the config tab
  • [27] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [28] 5DSDXORD hydra: missing plain.tt
  • [29] LSZLZHJY Allow users to edit their own settings
  • [30] J3RYO2CU Remove the jobs status page
  • [31] AK2UZDS2 Jobset page: Add a new tab to show job status in a matrix
  • [32] 2BUX775I * More release -> view.
  • [33] WRIU3S5E * UI for cloning builds (not functional yet).
  • [34] KKJNJHO5 Update bootstrap to 2.0.3
  • [35] AS2OXLRM * Editing releases.
  • [36] 3JBUMW3E forgot to commit a file
  • [37] LZVO64YG Merge in the first bits of the API work
  • [38] SFUSIKUY * Use isCurrent to determine the inactive jobs.
  • [39] VG4QG336 Remove tablesorter
  • [40] FV2M6MOT hydra: use autoconf/-make
  • [41] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [42] U72VNKRU Remove unused file
  • [43] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [44] Q4VDOA76 Replace last 5 builds on jobset page with last 5 evaluations. Moved hide/unhide and evaluate options to jobset topmenu.
  • [45] JXPHAZMV Minor style changes
  • [46] NEQ4BISO Add bootstrap.zip
  • [47] TRDGNILT Remove unused file
  • [48] Z4KRJX4Q * In the last succeeded / job status queries, use the Builds.isCurrent
  • [49] 6FRLEP4P first try for timeline of last 24 hours in hydra
  • [50] SMTMFEKE hydra: add missing templates
  • [51] U4TD3AIQ Add support for viewing jobset evaluations
  • [52] D5QIOJGP * Move everything up one directory.
  • [53] R2PON6R7 Allow non-admin users to see the machine status page
  • [54] AKAXJDMW * Disable the statistics on the project, jobset and job pages for now
  • [55] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [*] 3HZY24CX * Make jobsets viewable under

Change contents

  • edit in src/lib/Hydra/Controller/Jobset.pm at line 150
    [4.118][4.335:336](),[4.436][4.335:336](),[4.491][4.335:336](),[4.335][4.335:336](),[4.336][4.492:562](),[4.562][4.437:438](),[4.438][4.0:63](),[4.63][2.119:199](),[4.143][4.575:596](),[2.199][4.575:596](),[4.575][4.575:596](),[4.596][4.82:116](),[4.116][4.596:867](),[4.596][4.596:867](),[4.867][4.117:156](),[4.156][4.922:952](),[4.922][4.922:952]()
    $c->stash->{activeJobs} = [];
    $c->stash->{inactiveJobs} = [];
    my $latestEval = $c->stash->{jobset}->jobsetevals->search(
    { hasnewbuilds => 1 }, { rows => 1, order_by => ["id desc"] })->single;
    my %activeJobs;
    $c->stash->{activeJobs} = {};
    if (defined $latestEval) {
    foreach my $build ($latestEval->builds->search({}, { order_by => ["job"], select => ["job"] })) {
    my $job = $build->get_column("job");
    if (!defined $activeJobs{$job}) {
    $activeJobs{$job} = 1;
    $c->stash->{activeJobs}->{$job} = 1;
    }
    }
    }
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 151
    [4.953][4.953:1041](),[4.1041][4.157:370]()
    foreach my $job ($c->stash->{jobset}->jobs->search({}, { order_by => ["name"] })) {
    push @{$c->stash->{jobs}}, $job->name;
    }
    }
    sub job_status_tab : Chained('jobsetChain') PathPart('job-status-tab') Args(0) {
    my ($self, $c) = @_;
    $c->stash->{template} = 'jobset-job-status-tab.tt';
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 152
    [4.433]
    [4.433]
    my $filter = "%" . $c->stash->{filter} . "%";
  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 162
    [4.687][4.687:756]()
    { job => { ilike => "%" . $c->stash->{filter} . "%" } },
    [4.687]
    [4.756]
    { job => { ilike => $filter } },
  • edit in src/lib/Hydra/Controller/Jobset.pm at line 174
    [4.1098]
    [4.1098]
    if ($c->request->params->{showInactive}) {
    $c->stash->{showInactive} = 1;
    foreach my $job ($c->stash->{jobset}->jobs->search({ name => { ilike => $filter } })) {
    next if defined $jobs{$job->name};
    $c->stash->{inactiveJobs}->{$job->name} = $jobs{$job->name} = 1;
    }
    }
  • file deletion: jobset-job-status-tab.tt (----------)
    [4.1486][4.2795:2843](),[4.2843][4.1178:1178]()
    [% PROCESS common.tt; USE Math %]
    <form class="form-search" id="filter-jobs">
    <img src="/static/images/ajax-loader.gif" alt="Loading..." style="display: none;" id="filter-loading" />
    </form>
    <script>
    if (status == "error") {
    $('#[% tabName %]').html("<div class='alert alert-error'>Error loading tab: " + xhr.status + " " + xhr.statusText + "</div>");
    }
    });
    return false;
    });
    </script>
    [% IF jobs.size == 0 %]
    <div class="alert">There are no matching jobs.</div>
    [% ELSE %]
    [% evalIds = evals.keys.nsort.reverse %]
    <table class="table table-striped table-condensed table-header-rotated">
    <thead>
    <tr>
    <th style="width: 1em;">Job</th>
    [% FOREACH eval IN evalIds %]
    <th class="rotate-45">
    <div><span>
    <a href="[% c.uri_for('/eval' eval) %]">[% eval %]</a>
    </span></div></th>
    [% END %]
    </tr>
    </thead>
    <tbody>
    [% FOREACH j IN jobs-%]
    <tr>
    <th>[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]</th>
    [% FOREACH eval IN evalIds %]
    <td>[% r = evals.$eval.$j; IF r.id %]<a href="[% c.uri_for('/build' r.id) %]">[% INCLUDE renderBuildStatusIcon size=16 build=r %]</a>[% END %]</td>
    [% END %]
    </tr>
    [% END %]
    </tbody>
    </table>
    [% END %]
    [% IF nrJobs > jobs.size %]
    <div class="alert">Showing the first [% jobs.size %] jobs only. <a href="javascript:setFilter('filter=%')">Show all [% nrJobs %] jobs...</a></div>
    [% END %]
    };
    $('#filter-jobs').submit(function() {
    setFilter($('#filter-jobs').serialize());
    function setFilter(filter) {
    $('#filter-loading').show().focus();
    $('#tabs-job-status').load("[% c.uri_for('/jobset' project.name jobset.name "job-status-tab") %]", filter, function(response, status, xhr) {
    <input name="filter" type="text" class="input-large search-query" placeholder="Search jobs by name" [% HTML.attributes(value => filter) %]></input>
  • replacement in src/root/jobset-jobs-tab.tt at line 1
    [4.2227][4.2228:2252]()
    [% PROCESS common.tt %]
    [4.2227]
    [4.2252]
    [% PROCESS common.tt; USE Math %]
    <form class="form-search" id="filter-jobs">
    <div class="input-append">
    <input name="filter" type="text" class="input-large search-query" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]></input>
    <button type="button" class="btn btn-info [% IF showInactive %]active[% END %]" id="active-toggle">Show inactive jobs</button>
    </div>
    &nbsp;
    <img src="/static/images/ajax-loader.gif" alt="Loading..." style="display: none;" id="filter-loading" />
    </form>
    <script>
    function setFilter(filter) {
    $('#filter-loading').show();
    if ($('#active-toggle').hasClass('active')) filter += '&amp;showInactive=1';
    $('#tabs-jobs').load("[% c.uri_for('/jobset' project.name jobset.name "jobs-tab") %]", filter, function(response, status, xhr) {
    if (status == "error") {
    $('#[% tabName %]').html("<div class='alert alert-error'>Error loading tab: " + xhr.status + " " + xhr.statusText + "</div>");
    }
    });
    };
  • edit in src/root/jobset-jobs-tab.tt at line 23
    [4.2253]
    [4.2844]
    $('#filter-jobs').submit(function() {
    setFilter($('#filter-jobs').serialize());
    return false;
    });
    $('#active-toggle').click(function() {
    $(this).toggleClass('active');
    $('#filter-jobs').submit();
    });
    </script>
  • replacement in src/root/jobset-jobs-tab.tt at line 35
    [4.2868][4.2868:2924]()
    <div class="alert">This jobset has no jobs yet.</div>
    [4.2868]
    [4.2924]
    <div class="alert">There are no matching jobs.</div>
  • replacement in src/root/jobset-jobs-tab.tt at line 39
    [4.2935][4.2935:3215]()
    <div class="well well-small">Below is the list of all [% jobs.size
    %] jobs that have ever existed in this jobset. Jobs that are no
    longer part of the jobset (i.e., that don't appear in the latest
    evaluation of the jobset) are <span class="muted">grayed out</span>.</div>
    [4.2935]
    [4.2544]
    [% IF nrJobs > jobs.size %]
    <div class="alert">Showing the first [% jobs.size %] jobs. <a href="javascript:setFilter('filter=%')">Show all [% nrJobs %] jobs...</a></div>
    [% END %]
  • replacement in src/root/jobset-jobs-tab.tt at line 44
    [4.2545][4.3216:3270]()
    <table class="table table-striped table-condensed">
    [4.2545]
    [4.3270]
    [% evalIds = evals.keys.nsort.reverse %]
    <table class="table table-striped table-condensed table-header-rotated">
  • replacement in src/root/jobset-jobs-tab.tt at line 47
    [4.3282][4.3282:3315]()
    <tr><th>Job name</th></tr>
    [4.3282]
    [4.3315]
    <tr>
    <th style="width: 1em;">Job</th>
    [% FOREACH eval IN evalIds %]
    <th class="rotate-45">
    <div><span>
    <a href="[% c.uri_for('/eval' eval) %]">[% eval %]</a>
    </span></div></th>
    [% END %]
    </tr>
  • replacement in src/root/jobset-jobs-tab.tt at line 58
    [4.3340][4.3340:3543]()
    [% FOREACH j IN jobs %]<tr><td><span class="[% IF !activeJobs.$j %]muted override-link[% END %]">[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]</span></td></tr>[% END %]
    [4.3340]
    [4.3543]
    [% FOREACH j IN jobs-%]
    <tr>
    <th><span [% IF inactiveJobs.$j %]class="muted override-link"[% END %]>[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]</span></th>
    [% FOREACH eval IN evalIds %]
    <td>[% r = evals.$eval.$j; IF r.id %]<a href="[% c.uri_for('/build' r.id) %]">[% INCLUDE renderBuildStatusIcon size=16 build=r %]</a>[% END %]</td>
    [% END %]
    </tr>
    [% END %]
  • edit in src/root/jobset-jobs-tab.tt at line 68
    [4.3567]
    [4.3567]
  • replacement in src/root/jobset.tt at line 48
    [4.6829][4.3689:3823]()
    <li><a href="#tabs-job-status" data-toggle="tab">Job status</a></li>
    <li><a href="#tabs-jobs" data-toggle="tab">All jobs</a></li>
    [4.6829]
    [4.210]
    <li><a href="#tabs-jobs" data-toggle="tab">Jobs</a></li>
  • edit in src/root/jobset.tt at line 143
    [4.30687][4.3824:3946]()
    [% INCLUDE makeLazyTab tabName="tabs-job-status" uri=c.uri_for('/jobset' project.name jobset.name "job-status-tab") %]