* hydra: queue stats (nr running builds / nr queued builds)

This commit is contained in:
Rob Vermaas 2010-02-12 10:19:24 +00:00
parent 68c60b4c66
commit 9cebf03a45
2 changed files with 5 additions and 1 deletions

View file

@ -16,6 +16,10 @@ sub begin :Private {
$c->stash->{curUri} = $c->request->uri;
$c->stash->{version} = $ENV{"HYDRA_RELEASE"} || "<devel>";
$c->stash->{nixVersion} = $ENV{"NIX_RELEASE"} || "<devel>";
$c->stash->{nrRunningBuilds} = $c->model('DB::BuildSchedulingInfo')->search({ busy => 1 }, {})->count();
$c->stash->{nrQueuedBuilds} = $c->model('DB::BuildSchedulingInfo')->count();
}

View file

@ -23,7 +23,7 @@
title = "Projects" %]
[% INCLUDE makeLink
uri = c.uri_for(c.controller('Root').action_for('queue'))
title = "Queue" %]
title = "Queue" %] ([% nrRunningBuilds %]/[% nrQueuedBuilds %])
[% INCLUDE makeLink
uri = c.uri_for(c.controller('Root').action_for('all'))
title = "All builds" %]