From 090a6480205e4fdb1e6c7038cb8c20c4f395f992 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 9 Feb 2010 13:43:53 +0000 Subject: [PATCH] hydra: minor improvements in hydra ui --- src/lib/Hydra/Controller/Jobset.pm | 17 ++++++++++++++--- src/root/jobset.tt | 18 +++++++++++++++++- src/root/static/css/hydra.css | 4 ++++ 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index f6ab3d17..26ac9c30 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -20,9 +20,10 @@ sub jobset : Chained('/') PathPart('jobset') CaptureArgs(2) { or notFound($c, "Jobset $jobsetName doesn't exist."); } +sub jobsetIndex { + my ($self, $c, $forceStatus) = @_; -sub index : Chained('jobset') PathPart('') Args(0) { - my ($self, $c) = @_; + print STDERR "index\n"; $c->stash->{template} = 'jobset.tt'; @@ -46,7 +47,7 @@ sub index : Chained('jobset') PathPart('') Args(0) { push(@systems, $system->system); } - if(scalar(@{$c->stash->{activeJobs}}) <= 20) { + if($forceStatus || scalar(@{$c->stash->{activeJobs}}) <= 20) { my @select = (); my @as = (); push(@select, "job"); push(@as, "job"); @@ -71,6 +72,16 @@ sub index : Chained('jobset') PathPart('') Args(0) { ->search({finished => 1}, {order_by => "timestamp DESC", rows => 5 })] ; } +sub index : Chained('jobset') PathPart('') Args(0) { + my ($self, $c) = @_; + jobsetIndex($self, $c, 0); +} + +sub indexWithStatus : Chained('jobset') PathPart('') Args(1) { + my ($self, $c, $forceStatus) = @_; + jobsetIndex($self, $c, 1); +} + # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('jobset') PathPart('') CaptureArgs(0) { diff --git a/src/root/jobset.tt b/src/root/jobset.tt index 468b50f8..e9432f0f 100644 --- a/src/root/jobset.tt +++ b/src/root/jobset.tt @@ -79,7 +79,7 @@
+ [% IF jobset.errormsg && !edit -%] +
There are evaluation errors!
+ + [% END %] + [% IF lastBuilds %]

Most recent builds

[% INCLUDE renderBuildList builds=lastBuilds %] @@ -123,6 +133,12 @@ [% END %] + [% IF !edit && !activeJobsStatus -%] +

Status

+

+ [ Show status overview ] +

+ [% END %]
[% IF !edit -%] diff --git a/src/root/static/css/hydra.css b/src/root/static/css/hydra.css index 1ad18163..c1922111 100644 --- a/src/root/static/css/hydra.css +++ b/src/root/static/css/hydra.css @@ -49,6 +49,10 @@ a.smallLink { white-space: pre-wrap; } +a#error-link { + color: red; +} + .error { color: red; font-weight: bold;