"Evaluate" command: push the jobset to the front of the eval queue

[?]
Feb 26, 2013, 3:56 PM
YG6VGK4F7YIQYXUFQQZYPXS4ABL2X47FTPB5RNIIP4BCWM3UHOBAC

Dependencies

  • [2] A43SLRSH Fix handling of IPC::Run::run exit status
  • [3] BIVZGPUT Optimise clickable rows
  • [4] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [5] PVIRRARJ Turn hiding/unhiding a jobset into a checkbox
  • [6] TLJC6BJ3 Add a menu item for deleting jobsets
  • [7] 6KJXJB7N qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite
  • [8] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra
  • [9] SGNXIOI4 Hydra/32: Add option to force evaluation of a certain jobset via web interface (for admins only)
  • [10] 7ZQAHJQM Fix indentation
  • [11] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [12] 5FP63F5T More command renaming.
  • [13] I4K2UPCW Tweaks
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website

Change contents

  • edit in src/lib/Hydra/Controller/Admin.pm at line 395
    [4.34][4.34:143](),[4.143][4.420:421](),[4.421][4.148:508](),[4.148][4.148:508](),[4.508][4.422:423](),[4.423][2.0:75](),[2.75][4.424:425](),[4.293][4.424:425](),[4.629][4.424:425](),[4.425][4.642:690](),[4.642][4.642:690](),[4.690][4.2170:2173](),[4.2170][4.2170:2173](),[4.2173][4.639:640]()
    sub force_eval : Chained('admin') Path('eval') Args(2) {
    my ($self, $c, $projectName, $jobsetName) = @_;
    my $project = $c->model('DB::Projects')->find($projectName)
    or notFound($c, "Project $projectName doesn't exist.");
    $c->stash->{project} = $project;
    $c->stash->{jobset_} = $project->jobsets->search({name => $jobsetName});
    $c->stash->{jobset} = $c->stash->{jobset_}->single
    or notFound($c, "Jobset $jobsetName doesn't exist.");
    captureStdoutStderr(60, "hydra-evaluator", $projectName, $jobsetName);
    $c->res->redirect("/project/$projectName");
    }
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 3
    [15.3509]
    [15.3509]
    use utf8;
  • edit in src/root/layout.tt at line 81
    [3.1460]
    [3.1460]
    bootbox.animate(false);
  • replacement in src/root/topbar.tt at line 98
    [4.6658][4.6658:6934]()
    [% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, jobset.name)
    content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ jobset.name _ "?") class = "" %]
    [4.6658]
    [4.13438]
    <script>
    function confirmEvaluateJobset() {
    bootbox.confirm(
    'Are you sure you want to force evaluation of this jobset?',
    function(c) {
    if (!c) return;
    $.post("[% c.uri_for('/api/push', { jobsets = project.name _ ':' _ jobset.name }) %]")
    .done(function(data) {
    if (data.error)
    bootbox.alert("Unable to schedule the jobset for evaluation: " + data.error);
    else
    bootbox.alert("The jobset has been scheduled for evaluation.");
    })
    .fail(function() { bootbox.alert("Server request failed!"); });
    });
    return;
    };
    </script>
    [% INCLUDE menuItem title="Evaluate" uri = "javascript:confirmEvaluateJobset()" %]