By default, show the first 250 jobs only

[?]
Aug 28, 2013, 11:10 AM
XU4PKY3UT67BMJYUQNLNGS5CNFP3TDK3PNON2K7MQIJF74J4JAVAC

Dependencies

  • [2] XL43MFDO Show visual feedback that the filter is being applied
  • [3] TJPIS3UP hydra: minor improvements in hydra ui
  • [4] 6QRHXIM3 * Speed up the jobset index page. Especially the query to get the
  • [5] AK2UZDS2 Jobset page: Add a new tab to show job status in a matrix
  • [*] 3HZY24CX * Make jobsets viewable under

Change contents

  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 202
    [3.1131][3.1131:1176]()
    $c->stash->{jobs} = [sort (keys %jobs)];
    [3.1131]
    [3.396]
    my @jobs = sort (keys %jobs);
    $c->stash->{nrJobs} = scalar @jobs;
    splice @jobs, 250 if $c->stash->{filter} eq "";
    $c->stash->{jobs} = [@jobs];
  • replacement in src/root/jobset-job-status-tab.tt at line 4
    [3.1258][3.1258:1403]()
    <input name="filter" type="text" class="input-large search-query" placeholder="Filter jobs..." [% HTML.attributes(value => filter) %]></input>
    [3.1258]
    [2.0]
    <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-job-status-tab.tt at line 9
    [3.1421][3.1421:1461](),[3.1461][2.108:141](),[2.141][3.1461:1629](),[3.1461][3.1461:1629]()
    $('#filter-jobs').submit(function() {
    $('#filter-loading').show();
    $('#tabs-job-status').load("[% c.uri_for('/jobset' project.name jobset.name "job-status-tab") %]", $('#filter-jobs').serialize(), function(response, status, xhr) {
    [3.1421]
    [3.1629]
    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) {
  • edit in src/root/jobset-job-status-tab.tt at line 16
    [3.1811]
    [3.1811]
    };
    $('#filter-jobs').submit(function() {
    setFilter($('#filter-jobs').serialize());
  • edit in src/root/jobset-job-status-tab.tt at line 29
    [3.1938]
    [3.1938]
    [% 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 %]