Add a page to show the latest evaluations for the entire server

This commit is contained in:
Eelco Dolstra
2013-02-21 17:27:17 +01:00
parent 767cab6cd2
commit ba68826860
7 changed files with 97 additions and 72 deletions

View File

@@ -281,4 +281,22 @@ sub logo :Local {
}
sub evals :Local Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'evals.tt';
my $page = int($c->req->param('page') || "1") || 1;
my $resultsPerPage = 20;
my $evals = $c->model('DB::JobsetEvals');
$c->stash->{page} = $page;
$c->stash->{resultsPerPage} = $resultsPerPage;
$c->stash->{total} = $evals->search({hasnewbuilds => 1})->count;
$c->stash->{evals} = getEvals($self, $c, $evals, ($page - 1) * $resultsPerPage, $resultsPerPage)
}
1;