Allow comparing an evaluation with an arbitrary other evaluation

The URI parameter "compare=..." can denote either an arbitrary
evaluation ID, or the name of a jobset in the same project.  In the
latter case, the comparison is made against the latest completed
evaluation of the specified jobset.
This commit is contained in:
Eelco Dolstra
2012-04-02 20:40:59 +02:00
parent 2f9153c640
commit 69e600da89
5 changed files with 47 additions and 17 deletions

View File

@ -351,9 +351,9 @@ sub evals : Chained('jobset') PathPart('evals') Args(0) {
, "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 1))"
, "(select count(*) from JobsetEvalMembers where eval = me.id and exists(select 1 from Builds b where b.id = build and b.finished = 1 and b.buildStatus = 0))"
]
, '+as' => [ "nrBuilds", "nrScheduled", "nrFinished", "nrSucceeded" ]
, rows => $resultsPerPage
, page => $page
, '+as' => [ "nrBuilds", "nrScheduled", "nrFinished", "nrSucceeded" ]
, rows => $resultsPerPage + 1
, offset => ($page - 1) * $resultsPerPage
}
) ];
}