* Start of a basic Catalyst web interface.

This commit is contained in:
Eelco Dolstra
2008-10-28 10:19:31 +00:00
parent c181fc8703
commit b250fa6094
21 changed files with 928 additions and 0 deletions

View File

@ -0,0 +1,65 @@
[% WRAPPER layout.tt title="Hydra Overview" %]
[% USE date %]
<h1>Build [% id %]</h1>
<h2>Information</h2>
<table>
<tr>
<th>Build ID:</th>
<td>[% build.id %]</td>
</tr>
<tr>
<th>Job name:</th>
<td>[% build.name %]</td>
</tr>
<tr>
<th>Description:</th>
<td>[% build.description %]</td>
</tr>
<tr>
<th>Time added:</th>
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
</tr>
<tr>
<th>Derivation store path:</th>
<td><tt>[% build.drvpath %]</tt></td>
</tr>
<tr>
<th>Output store path:</th>
<td><tt>[% build.outpath %]</tt></td>
</tr>
</table>
<h2>Build products</h2>
<ul>
[% FOREACH product IN build.buildproducts -%]
<li>
[% SWITCH product.type %]
[% CASE "nix-build" %]
Nix build of path <tt>[% product.path %]</tt>
[% END %]
</li>
[% END -%]
</ul>
<h2>Logs</h2>
<table>
<tr><th>Phase</th></tr>
[% FOREACH log IN build.buildlogs -%]
<tr>
<td><a href="[% c.uri_for('/log' build.id log.logphase) %]">[% log.logphase %]</a></td>
</tr>
[% END -%]
</table>
[% END %]

View File

@ -0,0 +1,7 @@
[% WRAPPER layout.tt title="Hydra Overview" %]
<h1>Error</h1>
<p>I'm very sorry, but an error occurred: <span class="error-msg">[% error %]</span></p>
[% END %]

View File

@ -0,0 +1,153 @@
body
{
font-family: sans-serif;
background: white;
margin: 2em 1em 2em 1em;
}
h1, h2, h3 {
font-weight: bold;
color: #005aa0;
}
h1 {
font-size: 220%;
}
h2 {
font-size: 130%;
}
h3 {
font-size: 100%;
}
table {
empty-cells: show;
border-collapse: collapse;
border-spacing: 0px;
}
th {
text-align: center;
font-weight: bold;
}
td, th {
padding: 2px 5px;
border: solid black 1px;
}
th {
background: #ffffc0;
}
td.pkgname {
font-size: 140%;
font-weight: bold;
color: #005aa0;
background: #ffffe0;
}
td.pkgname table {
border: none;
border-spacing: 0px;
}
td.pkgname table td {
border: none;
}
td.pkgname td.pkgname {
width: 100%;
}
td.reltype {
font-weight: bold;
color: #400000;
}
td.date, span.date, span.svnrev {
color: #400000;
}
a:link { color: #0048b3; }
a:visited { color: #002a6a; }
a:hover { background: #ffffcd; }
span.relname {
font-weight: bold;
}
span.filename, span.command {
font-family: monospace;
}
span.md5 {
font-family: monospace;
color: #400000;
}
.failurewarning {
font-weight: bold;
color: red;
}
p.failurewarning {
font-size: 120%;
}
span.system {
font-style: italic;
}
table.derivationList {
margin-left: 2em;
margin-right: 2em;
}
table.derivationList, table.derivationList td, table.derivationList th {
border: 1px solid #808080;
}
table.derivationList tr.odd {
background: #f0f0f0;
}
table.derivationList td {
vertical-align: top;
}
table.derivationList td.system {
font-style: italic;
}
a {
text-decoration: none;
}
a:hover, a:visited:hover {
text-decoration: underline;
}
img {
border-style: none;
}
table.buildfarmResults td, table.buildfarmResults th {
border: none;
}
td.buildfarmMainColumn {
background-color: #E0E0E0;
border: solid;
}
span.error-msg {
color: red;
}
pre.buildlog {
border: 1px solid black;
padding: 0.3em;
}

View File

@ -0,0 +1,18 @@
[% WRAPPER layout.tt title="Hydra Overview" %]
[% USE date %]
<h1>All builds</h1>
<table>
<tr><th>Id</th><th>Attribute name</th><th>Timestamp</th><th>Description</th></tr>
[% FOREACH build IN builds -%]
<tr>
<td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td>
<td>[% build.name %]</td>
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
<td>[% build.description %]</td>
</tr>
[% END -%]
</table>
[% END %]

View File

@ -0,0 +1,24 @@
[% USE date -%]
<?xml version="1.0" encoding="UTF-8"?>
<!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>[% title %]</title>
<link rel="stylesheet" href="/hydra.css" type="text/css" />
</head>
<body>
<div class="content">
[% content %]
</div>
<div class="footer">
<hr />
Generated at [% date.format %].
</div>
</body>
</html>

View File

@ -0,0 +1,10 @@
[% WRAPPER layout.tt title="Hydra Overview" %]
<h1>Build log <tt>[% log.logphase %] of build ID [% id %]</h1>
<!-- !!! escaping -->
<pre class="buildlog">
[% logtext -%]
</pre>
[% END %]