diff --git a/src/lib/Hydra/Base/Controller/ListBuilds.pm b/src/lib/Hydra/Base/Controller/ListBuilds.pm index f554803e..2845ee23 100644 --- a/src/lib/Hydra/Base/Controller/ListBuilds.pm +++ b/src/lib/Hydra/Base/Controller/ListBuilds.pm @@ -53,7 +53,7 @@ sub all : Chained('get_builds') PathPart { my $page = int($c->req->param('page')) || 1; - my $resultsPerPage = 50; + my $resultsPerPage = 20; my $nrBuilds = scalar($c->stash->{allBuilds}->search({finished => 1})); diff --git a/src/root/all.tt b/src/root/all.tt index bf786c14..4503facc 100644 --- a/src/root/all.tt +++ b/src/root/all.tt @@ -9,8 +9,7 @@

Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %] out of [% totalBuilds %] in order of descending timestamp.

-[% INCLUDE renderBuildList %] - +[% BLOCK renderNav %]

[First] [% IF page > 1 %] @@ -21,5 +20,13 @@ out of [% totalBuilds %] in order of descending timestamp.

[% END %] [Last]

+[% END %] + + +[% INCLUDE renderNav %] +[% INCLUDE renderBuildList %] +[% INCLUDE renderNav %] + + [% END %] diff --git a/src/root/common.tt b/src/root/common.tt index bbe0d41e..ea967b5c 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -68,7 +68,7 @@ [% END %] # [% IF showSchedulingInfo %] - Priority + P [% END %] Job Release Name @@ -77,7 +77,9 @@ [% IF showStatusChange %] Last status change [% END %] - Description + [% IF showDescription %] + Description + [% END %] @@ -120,13 +122,16 @@ [% END %] [% END %] + [% IF showDescription %] [% build.description %] + [% END -%] [% END -%] [% END %] +[% BLOCK renderLink %][% title %][% END %] [% BLOCK showBuildStats %] diff --git a/src/root/contextbar.tt b/src/root/contextbar.tt new file mode 100644 index 00000000..f73f4cc8 --- /dev/null +++ b/src/root/contextbar.tt @@ -0,0 +1,40 @@ +[% BLOCK makeLinkWrapped %] +
  • + [% title %] + [% content %] +
  • +[% END %] + +[% BLOCK makeLink -%] +[% INCLUDE makeLinkWrapped content="" -%] +[% END %] + +[% BLOCK makeSubMenu %] + +[% END %] + + + +[% IF project %] +[% WRAPPER makeSubMenu %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Project').action_for('view'), [project.name]) + title = project.name %] + + [% IF jobset %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Jobset').action_for('index'), [project.name, jobset.name]) + title = jobset.name %] + [% END %] + + [% IF job %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Job').action_for('index'), [project.name, jobset.name, job.name]) + title = job.name %] + + [% END %] +[% END %] +[% END %] + diff --git a/src/root/job.tt b/src/root/job.tt index 2a34d147..7530c921 100644 --- a/src/root/job.tt +++ b/src/root/job.tt @@ -2,7 +2,11 @@ [% PROCESS common.tt %] -

    Job [% project.name %]:[% jobset.name %]:[% job.name %]

    +

    Job [% INCLUDE renderLink + uri = c.uri_for(c.controller('Project').action_for('view'), [project.name]) + title = project.name %]:[% INCLUDE renderLink + uri = c.uri_for(c.controller('Jobset').action_for('index'), [project.name, jobset.name]) + title = jobset.name %]:[% job.name %]

    Channels

    diff --git a/src/root/jobset.tt b/src/root/jobset.tt index 69097b24..341c0a32 100644 --- a/src/root/jobset.tt +++ b/src/root/jobset.tt @@ -1,7 +1,6 @@ [% WRAPPER layout.tt title=(edit ? (create ? "New Jobset in Project ‘$project.name’" : "Editing Jobset ‘$project.name:$jobset.name’") : "Jobset ‘$project.name:$jobset.name’") %] [% PROCESS common.tt %] - [% IF edit %]
    [% END %] @@ -10,7 +9,9 @@ [% IF create %]

    New Jobset in Project [% project.name %]

    [% ELSE %] -

    Jobset [% project.name %]:[% jobset.name %]

    +

    Jobset [% INCLUDE renderLink + uri = c.uri_for(c.controller('Project').action_for('view'), [project.name]) + title = project.name %]:[% jobset.name %]

    [% END %] diff --git a/src/root/layout.tt b/src/root/layout.tt index 4a9beef8..da70b7c4 100644 --- a/src/root/layout.tt +++ b/src/root/layout.tt @@ -11,8 +11,8 @@ Hydra - [% title %] - + @@ -71,24 +71,29 @@ -
    - -
    - +
    + + +
    [% PROCESS navbar.tt %] -
    -
    - [% content %] - + diff --git a/src/root/navbar.tt b/src/root/navbar.tt index 18f140ed..cb91dd5e 100644 --- a/src/root/navbar.tt +++ b/src/root/navbar.tt @@ -5,61 +5,36 @@ [% END %] + +[% BLOCK menuItem %] +
  • + [% title %] +
  • +[% END %] + [% BLOCK makeLink -%] [% INCLUDE makeLinkWrapped content="" -%] [% END %] [% BLOCK makeSubMenu %] [% extra = collapsed ? "collapsed" : "" %] -
  • + [% title %] + [% content %] +
  • +[% END %] + +[% BLOCK makeLink -%] +[% INCLUDE makeLinkWrapped content="" -%] +[% END %] + +[% BLOCK makeSubMenu %] +
      + [% content %] +
    + +[% END %] + + + [% WRAPPER makeSubMenu title="Hydra" %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('index')) + title = "Overview" %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('queue')) + title = "Queue" %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('all')) + title = "All builds" %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('jobstatus')) + title = "Job status" %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('errors')) + title = "Errors" %] + [% IF c.user_exists %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('logout')) + title = "Sign out" %] + [% ELSE %] + [% INCLUDE makeLink + uri = c.uri_for(c.controller('Root').action_for('login')) + title = "Sign in" %] + [% END %] + [% END %] + +