1
0
mirror of https://github.com/golang/go synced 2024-11-25 21:37:58 -07:00
go/misc/dashboard/app/build/ui.html
Andrew Gerrand 7c94dc04a7 dashboard: display correct package build state
Includes some boring whitespace tweaks.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5492067
2011-12-20 11:30:48 +11:00

150 lines
3.3 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>Go Build Dashboard</title>
<style>
body {
font-family: sans-serif;
padding: 0; margin: 0;
}
h1, h2 {
margin: 0;
padding: 5px;
}
h1 {
background: #eee;
}
h2 {
margin-top: 10px;
}
.build, .packages {
margin: 5px;
border-collapse: collapse;
}
.build td, .build th, .packages td, .packages th {
vertical-align: top;
padding: 2px 4px;
font-size: 10pt;
}
.build tr:nth-child(2n) {
background-color: #f0f0f0;
}
.build .hash {
font-family: monospace;
}
.build .result {
text-align: center;
width: 50px;
}
.build .time {
font-family: monospace;
color: #666;
}
.build .descr, .build .time, .build .user {
white-space: nowrap;
}
.paginate {
padding: 0.5em;
}
.paginate a {
padding: 0.5em;
background: #eee;
color: blue;
}
.paginate a.inactive {
color: #999;
}
.fail {
color: #C00;
}
</style>
</head>
<body>
<h1>Go Build Status</h1>
<h2>Go</h2>
{{if $.Commits}}
<table class="build">
<tr>
<th>&nbsp;</th>
{{range $.Builders}}
<th class="result">{{builderTitle .}}</th>
{{end}}
</tr>
{{range $c := $.Commits}}
<tr>
<td class="hash"><a href="{{repoURL .Hash ""}}">{{shortHash .Hash}}</a></td>
{{range $.Builders}}
<td class="result">
{{with $c.Result . ""}}
{{if .OK}}
<span class="ok">ok</span>
{{else}}
<a href="/log/{{.LogHash}}" class="fail">fail</a>
{{end}}
{{else}}
&nbsp;
{{end}}
</td>
{{end}}
<td class="user">{{shortUser .User}}</td>
<td class="time">{{.Time.Time.Format "02 Jan 2006 15:04"}}</td>
<td class="desc">{{shortDesc .Desc}}</td>
</tr>
{{end}}
</table>
{{with $.Pagination}}
<div class="paginate">
<a {{if .HasPrev}}href="?page={{.Prev}}"{{else}}class="inactive"{{end}}>prev</a>
<a {{if .Next}}href="?page={{.Next}}"{{else}}class="inactive"{{end}}>next</a>
<a {{if .HasPrev}}href="?page=0}"{{else}}class="inactive"{{end}}>top</a>
</div>
{{end}}
{{else}}
<p>No commits to display. Hm.</p>
{{end}}
<h2>Other packages</h2>
<table class="packages">
<tr>
<th>State</th>
<th>Package</th>
<th>&nbsp;</th>
</tr>
{{range $state := $.TipState}}
<tr>
<td>
{{if .Results}}
<img src="/static/status_{{if .OK}}good{{else}}alert{{end}}.gif" />
{{else}}
&nbsp;
{{end}}
</td>
<td><a title="{{.Package.Path}}">{{.Package.Name}}</a></td>
<td>
{{range .Results}}
<div>
{{$h := $state.Commit.Hash}}
<a href="{{repoURL $h $state.Commit.PackagePath}}">{{shortHash $h}}</a>
{{if .OK}}
ok
{{else}}
<a href="/log/{{.LogHash}}" class="fail">failed</a>
{{end}}
on {{.Builder}}/<a href="{{repoURL .GoHash ""}}">{{shortHash .GoHash}}</a>
</a></div>
{{end}}
</td>
</tr>
{{end}}
</table>
</body>
</html>