forked from lix-project/hydra
make logo configurable via HYDRA_LOGO env var
This commit is contained in:
parent
d4c96a47c9
commit
a8b3ebd514
|
@ -17,10 +17,10 @@ sub begin :Private {
|
|||
$c->stash->{version} = $ENV{"HYDRA_RELEASE"} || "<devel>";
|
||||
$c->stash->{nixVersion} = $ENV{"NIX_RELEASE"} || "<devel>";
|
||||
$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;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
|
||||
|
||||
<head>
|
||||
<title>Hydra - [% title %]</title>
|
||||
<link type="text/css" href="/static/js/jquery/css/smoothness/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />
|
||||
|
@ -15,18 +15,18 @@
|
|||
<link rel="stylesheet" href="/static/css/nix-common.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/nixos-site.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/logfile.css" type="text/css" />
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-ui-1.8.5.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/js/jquery-ui-1.8.5.custom.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/tablesorter/jquery.tablesorter.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
/*** Sortable tables. ***/
|
||||
|
||||
|
||||
$("table.tablesorter").tablesorter();
|
||||
|
||||
|
||||
|
||||
/*** Tree toggles in logfiles. ***/
|
||||
|
||||
/* Set the appearance of the toggle depending on whether the
|
||||
|
@ -69,19 +69,19 @@
|
|||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="page">
|
||||
|
||||
<div id="header">
|
||||
<div id="logo"><a class="no-hover" href="/"><img src="/static/images/hydra.png" alt="Hydra Logo" /></a></div>
|
||||
[% PROCESS topbar.tt %]
|
||||
<div id="page">
|
||||
|
||||
<div id="header">
|
||||
<div id="logo"><a class="no-hover" href="/"><img src="[% logo %]" alt="Hydra Logo" /></a></div>
|
||||
[% PROCESS topbar.tt %]
|
||||
[% PROCESS contextbar.tt %]
|
||||
</div>
|
||||
<div id="main">
|
||||
[% PROCESS navbar.tt %]
|
||||
<div id="main">
|
||||
[% PROCESS navbar.tt %]
|
||||
|
||||
<div id="content">
|
||||
[% content %]
|
||||
|
|
Loading…
Reference in a new issue