diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index ba647cd4..c096a198 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -17,10 +17,10 @@ sub begin :Private { $c->stash->{version} = $ENV{"HYDRA_RELEASE"} || ""; $c->stash->{nixVersion} = $ENV{"NIX_RELEASE"} || ""; $c->stash->{curTime} = time; - + $c->stash->{logo} = $ENV{"HYDRA_LOGO"} ? "/logo" : "/static/images/hydra.png" ; if (scalar(@args) == 0 || $args[0] ne "static") { - $c->stash->{nrRunningBuilds} = $c->model('DB::BuildSchedulingInfo')->search({ busy => 1 }, {})->count(); - $c->stash->{nrQueuedBuilds} = $c->model('DB::BuildSchedulingInfo')->count(); + $c->stash->{nrRunningBuilds} = $c->model('DB::BuildSchedulingInfo')->search({ busy => 1 }, {})->count(); + $c->stash->{nrQueuedBuilds} = $c->model('DB::BuildSchedulingInfo')->count(); } } @@ -224,4 +224,11 @@ sub change_password_submit : Path('change-password/submit') : Args(0) { $c->res->redirect("/"); } +sub logo :Local { + my ($self, $c) = @_; + my $path = $ENV{"HYDRA_LOGO"} or die("Logo not set!"); + $c->serve_static_file($path); +} + + 1; diff --git a/src/root/layout.tt b/src/root/layout.tt index bbb2d1b3..d60077e9 100644 --- a/src/root/layout.tt +++ b/src/root/layout.tt @@ -7,7 +7,7 @@ - + Hydra - [% title %] @@ -15,18 +15,18 @@ - - + + - + - + - + -
- -