From 5b6b9d37f04aae934853d3b99e8118c83fc13a5a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Mar 2013 17:37:17 +0100 Subject: [PATCH] Add a button to compare a jobset eval against other jobsets So now "?compare=" is no longer a hidden feature! P.S. Encountered this wonderful TemplateToolkit brainfuck again: if you want to get the number of rows in (say) project.jobsets, you can't say "project.jobsets.size". That will *usually* give the right result, except that if there is only one row in project.jobsets, it will evaluate to 3. Instead you have to use "project.jobsets_rs.count". --- src/root/jobset-eval.tt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/root/jobset-eval.tt b/src/root/jobset-eval.tt index 23d3dd79..ce7d9345 100644 --- a/src/root/jobset-eval.tt +++ b/src/root/jobset-eval.tt @@ -1,6 +1,19 @@ [% WRAPPER layout.tt title="Evaluation $eval.id of jobset $project.name:$jobset.name " %] [% PROCESS common.tt %] +
+ Compare to... + +
+ [% IF otherEval %]

Comparisons are relative to [% INCLUDE renderFullJobsetName project=otherEval.jobset.project.name jobset=otherEval.jobset.name %] evaluation