automatic reload of tail log when build is running

[?]
Feb 2, 2011, 9:00 AM
MMDLWWZ2W2XVHHOTG2S5XCPITVNIJQ6F7GLCF2MKQANFNFEID7DAC

Dependencies

  • [2] ELABMHJI * hydra: layout changes
  • [3] SAIUFDP3 hydra: make sure viewing logs works when logs are bz2'd
  • [4] J5UVLXOK * Start of a basic Catalyst web interface.
  • [5] UVMFS73T * Some jQuery / CSS hackery.
  • [6] AX5EQJO3 hydra: show machine in buildsteps
  • [7] 45ESKY6T * hydra: show finish time on build status overview
  • [8] TW5ZQX5Z * Move up the build products in the builds page, since they're more
  • [9] XHK7IGYI * hdyra: show last succeeded build and changes since on build status summary if build has failed
  • [10] ZI535LI6 * hydra: 'new' UI for project/jobset/job/build
  • [11] KAZWI5G4 * hydra: buildpage, show changes since last build/successful build
  • [12] BEKA3TMM Hydra/25: At job pages, show the hash of the output
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] 6F4UNDTC * Provide access to the raw, non-pretty-printed logfiles.

Change contents

  • edit in src/lib/Hydra/Controller/Build.pm at line 128
    [3.396]
    [15.797]
    }
    elsif ($mode eq "tail-reload") {
    my $url = $c->request->uri->as_string;
    $url =~ s/tail-reload/tail/g;
    $c->stash->{url} = $url;
    $c->stash->{reload} = defined $c->stash->{build}->schedulingInfo && $c->stash->{build}->schedulingInfo->busy;
    $c->stash->{title} = "";
    $c->stash->{contents} = (scalar `$pipestart | tail -n 50`) || " ";
    $c->stash->{template} = 'plain-reload.tt';
  • replacement in src/root/build.tt at line 57
    [4.3655][4.3655:3773]()
    (<a href="[% log %]">log</a>, <a href="[% "$log/raw" %]">raw</a>, <a href="[% "$log/tail" %]">tail</a>)
    [4.3655]
    [4.3773]
    (<a href="[% log %]">log</a>, <a href="[% "$log/raw" %]">raw</a>, <a href="[% "$log/tail-reload" %]">tail</a>)
  • replacement in src/root/build.tt at line 146
    [4.5782][4.5782:5865]()
    <a href="[% c.uri_for('/build' build.id 'log' 'tail') %]">tail</a>)
    [4.5782]
    [4.5865]
    <a href="[% c.uri_for('/build' build.id 'log' 'tail-reload') %]">tail</a>)
  • replacement in src/root/build.tt at line 354
    [4.11467][4.11467:11548]()
    <a href="[% c.uri_for('/build' build.id 'log' 'tail') %]">tail</a>)
    [4.11467]
    [4.11548]
    <a href="[% c.uri_for('/build' build.id 'log' 'tail-reload') %]">tail</a>)
  • replacement in src/root/static/css/hydra.css at line 144
    [2.2667][2.2667:2696]()
    border: 1px solid black;
    [2.2667]
    [2.2696]
    border: 3px solid darkblue;
  • edit in src/root/static/css/hydra.css at line 147
    [2.2743]
    [4.637]
    background: black;
    color: #ffffff;