From d08a391b43d790c18a116d66a9ed3952ae9917b0 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra
Date: Fri, 22 Feb 2013 11:37:35 +0100
Subject: [PATCH] Jobset page: Show last evaluation time
---
src/lib/Hydra/Controller/Jobset.pm | 2 ++
src/root/errors.tt | 4 ++--
src/root/jobset.tt | 20 ++++++++++++++------
3 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm
index 02845ef2..4923b47f 100644
--- a/src/lib/Hydra/Controller/Jobset.pm
+++ b/src/lib/Hydra/Controller/Jobset.pm
@@ -51,6 +51,8 @@ sub jobsetIndex {
$c->stash->{evals} = getEvals($self, $c, scalar $c->stash->{jobset}->jobsetevals, 0, 10);
+ ($c->stash->{latestEval}) = $c->stash->{jobset}->jobsetevals->search({}, { limit => 1, order_by => ["id desc"] });
+
$c->stash->{systems} =
[ $c->stash->{jobset}->builds->search({ iscurrent => 1 }, { select => ["system"], distinct => 1, order_by => "system" }) ];
diff --git a/src/root/errors.tt b/src/root/errors.tt
index 6d45150d..04ef39a8 100644
--- a/src/root/errors.tt
+++ b/src/root/errors.tt
@@ -25,7 +25,7 @@ that don’t build.
[% INCLUDE renderFullJobsetName project=j.project.name jobset=j.name %] |
- [% HTML.escape(j.errormsg) %]
+ [% HTML.escape(j.errormsg) %]
|
[% END %]
@@ -51,7 +51,7 @@ that don’t build.
[% INCLUDE renderFullJobName project=j.project.name jobset=j.jobset.name job=j.name %] |
- [% HTML.escape(j.errormsg) %]
+ [% HTML.escape(j.errormsg) %]
|
[% END %]
diff --git a/src/root/jobset.tt b/src/root/jobset.tt
index ee65f79c..3c1d23fc 100644
--- a/src/root/jobset.tt
+++ b/src/root/jobset.tt
@@ -59,7 +59,18 @@
Last checked: |
[% IF jobset.lastcheckedtime %]
- [% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime %][% IF jobset.errormsg %], with evaluation errors![% ELSE %], no evaluation errors[% END %]
+ [% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime %][% IF jobset.errormsg %], with
+ evaluation errors![% ELSE %], no evaluation errors[% END %]
+ [% ELSE %]
+ never
+ [% END %]
+ |
+
+
+ Last evaluation: |
+
+ [% IF latestEval %]
+ [% INCLUDE renderDateTime timestamp = latestEval.timestamp %]
[% ELSE %]
never
[% END %]
@@ -111,11 +122,8 @@
[% IF jobset.errormsg %]
- Evaluation errors
-
- Errors occurred at [% INCLUDE renderDateTime timestamp=jobset.errortime %].
-
- [% HTML.escape(jobset.errormsg) %]
+ Errors occurred at [% INCLUDE renderDateTime timestamp=jobset.errortime %].
+ [% HTML.escape(jobset.errormsg) %]
[% END %]
|