* Separate job status and all builds pages.

[?]
Nov 27, 2008, 12:38 AM
YTSIRIMKV2EN6CMO6LFX5J3NBJJYWBJKYDU3Z53CGXCIWP3FYI2QC

Dependencies

Change contents

  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 75
    [3.732][3.732:737](),[3.737][4.124:246](),[4.124][4.124:246](),[4.246][3.738:743](),[3.743][4.246:406](),[4.246][4.246:406](),[4.406][4.0:252](),[4.252][4.591:604](),[4.591][4.591:604]()
    $c->stash->{allBuilds} = [$c->model('DB::Builds')->search(
    {finished => 1}, {order_by => "timestamp DESC"})];
    # Get the latest finished build for each unique job.
    $c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef,
    { join => 'resultInfo'
    , where => "finished != 0 and timestamp = (select max(timestamp) from Builds " .
    "where project == me.project and attrName == me.attrName and finished != 0 and system == me.system)"
    , order_by => "project, attrname, system"
    })];
  • edit in src/Hydra/lib/Hydra/Controller/Root.pm at line 118
    [4.299]
    [4.0]
    }
    sub jobstatus :Local {
    my ($self, $c) = @_;
    $c->stash->{template} = 'jobstatus.tt';
    # Get the latest finished build for each unique job.
    $c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef,
    { join => 'resultInfo'
    , where => "finished != 0 and timestamp = (select max(timestamp) from Builds " .
    "where project == me.project and attrName == me.attrName and finished != 0 and system == me.system)"
    , order_by => "project, attrname, system"
    })];
    }
    sub all :Local {
    my ($self, $c, $page) = @_;
    $c->stash->{template} = 'all.tt';
    $page = int($page) || 1;
    my $resultsPerPage = 50;
    my $nrBuilds = scalar($c->model('DB::Builds')->search({finished => 1}));
    $c->stash->{page} = $page;
    $c->stash->{resultsPerPage} = $resultsPerPage;
    $c->stash->{totalBuilds} = $nrBuilds;
    $c->stash->{builds} = [$c->model('DB::Builds')->search(
    {finished => 1}, {order_by => "timestamp DESC", rows => $resultsPerPage, page => $page})];
  • file addition: all.tt (----------)
    [4.857]
    [% WRAPPER layout.tt title="All Builds" %]
    [% PROCESS common.tt %]
    <h1>All Builds</h1>
    <p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %]
    out of [% totalBuilds %] in order of descending timestamp.</p>
    [% PROCESS renderBuildList %]
    [<a href="[% c.uri_for('/all' 1) %]">First</a>]
    [% IF page > 1 %]
    [<a href="[% c.uri_for('/all' (page - 1)) %]">Prev</a>]
    [% END %]
    [% IF page * resultsPerPage < totalBuilds %]
    [<a href="[% c.uri_for('/all' (page + 1)) %]">Next</a>]
    [% END %]
    [<a href="[% c.uri_for('/all' (totalBuilds - 1) div resultsPerPage + 1) %]">Last</a>]
    [% END %]
  • replacement in src/Hydra/root/build.tt at line 1
    [4.7350][4.7351:7398]()
    [% WRAPPER layout.tt title="Hydra Overview" %]
    [4.7350]
    [4.2280]
    [% WRAPPER layout.tt title="Build Information" %]
  • replacement in src/Hydra/root/error.tt at line 1
    [4.8490][4.8491:8538]()
    [% WRAPPER layout.tt title="Hydra Overview" %]
    [4.8490]
    [4.2447]
    [% WRAPPER layout.tt title="Error" %]
  • replacement in src/Hydra/root/index.tt at line 1
    [4.10713][4.10714:10761]()
    [% WRAPPER layout.tt title="Hydra Overview" %]
    [4.10713]
    [4.2202]
    [% WRAPPER layout.tt title="Overview" %]
  • edit in src/Hydra/root/index.tt at line 11
    [3.1562][3.1562:1564](),[3.1564][4.3567:3587](),[4.1411][4.3567:3587](),[4.3587][4.1685:1735](),[4.421][4.1685:1735](),[4.1735][4.421:422](),[4.421][4.421:422](),[4.422][4.2227:2277](),[4.624][4.10776:10777](),[4.2277][4.10776:10777](),[4.10776][4.10776:10777](),[4.10777][4.1412:1413](),[4.1413][4.3588:3608](),[4.3608][4.625:672](),[4.10797][4.625:672](),[4.672][4.10797:10798](),[4.10797][4.10797:10798](),[4.10798][4.2278:2325]()
    <h2>Job status</h2>
    <p>Below are the latest builds for each job.</p>
    [% PROCESS renderBuildList builds=latestBuilds %]
    <h2>All builds</h2>
    <p>Number of builds: [% allBuilds.size %]</p>
    [% PROCESS renderBuildList builds=allBuilds %]
  • replacement in src/Hydra/root/job.tt at line 1
    [4.1384][4.1385:1432]()
    [% WRAPPER layout.tt title="Hydra Overview" %]
    [4.1384]
    [4.2326]
    [% WRAPPER layout.tt title="Job ‘$curProject.name:$jobName’" %]
  • file addition: jobstatus.tt (----------)
    [4.857]
    [% WRAPPER layout.tt title="Job Status" %]
    [% PROCESS common.tt %]
    <h1>Job Status</h1>
    <p>Below are the latest builds for each job.</p>
    [% PROCESS renderBuildList builds=latestBuilds %]
    [% END %]
  • replacement in src/Hydra/root/layout.tt at line 16
    [4.11467][4.11467:11498]()
    <title>[% title %]</title>
    [4.11467]
    [4.232]
    <title>Hydra - [% title %]</title>
  • edit in src/Hydra/root/layout.tt at line 85
    [4.442]
    [4.442]
    [% INCLUDE makeLink uri = c.uri_for('/jobstatus') title = "Job status" %]
  • replacement in src/Hydra/root/log.tt at line 1
    [4.11783][4.11784:11831]()
    [% WRAPPER layout.tt title="Hydra Overview" %]
    [4.11783]
    [4.11831]
    [% WRAPPER layout.tt title="Logfile" %]
  • replacement in src/Hydra/root/project.tt at line 1
    [4.1667][4.1668:1715]()
    [% WRAPPER layout.tt title="Hydra Overview" %]
    [4.1667]
    [4.3183]
    [% WRAPPER layout.tt title=(edit ? (create ? "New Project" : "Editing Project ‘$curProject.name’") : "Project ‘$curProject.name’") %]
  • edit in src/Hydra/root/project.tt at line 177
    [4.3636]
    [4.3636]
    [% IF !edit %]
    <h2>Statistics</h2>
    [% PROCESS showBuildStats %]
    [% END %]
  • edit in src/Hydra/root/project.tt at line 250
    [4.1526][4.5205:5222](),[4.5222][4.1526:1527](),[4.1526][4.1526:1527]()
    [% IF !edit %]
  • edit in src/Hydra/root/project.tt at line 251
    [4.1528][4.2674:2688](),[4.2674][4.2674:2688]()
    <h2>Jobs</h2>
  • edit in src/Hydra/root/project.tt at line 252
    [4.2689][3.1565:1604](),[3.1604][4.1556:1557](),[4.4760][4.1556:1557](),[4.1556][4.1556:1557](),[4.1557][4.2689:2731](),[4.2689][4.2689:2731](),[4.2731][4.616:732](),[4.732][4.2844:2862](),[4.2844][4.2844:2862](),[4.2862][4.1895:1896](),[4.1896][4.1558:1569](),[4.1569][4.1896:1897](),[4.1896][4.1896:1897](),[4.1897][4.1570:1634](),[4.1634][4.1897:1917](),[4.1897][4.1897:1917](),[4.1917][4.2862:2863](),[4.2862][4.2862:2863](),[4.2863][3.1605:1634](),[3.1634][4.5223:5237](),[4.2520][4.5223:5237]()
    [% IF jobNames && jobNames.size > 0 %]
    <ul>
    [% FOREACH jobName IN jobNames -%]
    <li><a href="[% c.uri_for('/job' curProject.name jobName.attrname) %]"><tt>[% jobName.attrname %]</tt></a></li>
    [% END %]
    </ul>
    [% ELSE %]
    <p>No builds have been performed or scheduled.</p>
    [% END %]
    <h2>Statistics</h2>
    [% PROCESS showBuildStats %]
    [% END %]
  • replacement in src/Hydra/root/queue.tt at line 1
    [2.1][2.2:46]()
    [% WRAPPER layout.tt title="Hydra Queue" %]
    [2.1]
    [2.46]
    [% WRAPPER layout.tt title="Queue" %]