Buildbot: Design for slaves pages

This commit is contained in:
Mitchell Hashimoto 2011-11-19 13:04:46 -08:00
parent efa29f1859
commit 40c1169d4c
5 changed files with 147 additions and 2 deletions

View File

@ -171,12 +171,14 @@ pre > code {
background-color: #FDDFDE;
}
.Module.buildtable tbody td.success,
.Module.waterfall thead th.success,
.Module.waterfall tbody td.success {
background-color: #D1EED1;
border-color: #BFE7BF;
}
.Module.buildtable tbody td.failure,
.Module.waterfall .BuildStep.failure {
background-color: #FDDFDE;
}

View File

@ -0,0 +1,72 @@
{% import 'macros/forms.html' as forms %}
{% from 'macros/build_line.html' import build_table, build_line %}
{% extends "layouts/base.html" %}
{% block content %}
<h1>Buildslave: {{ slavename|e }}</h1>
<ul class="tabs" data-tabs="tabs">
<li class="active"><a href="#current">Current Builds</a></li>
<li><a href="#recent">Recent Builds</a></li>
<li><a href="#info">Slave Info</a></li>
</ul>
<div class="tab-content">
<div class="active" id="current">
{% if current %}
<h3>Currently building:</h3>
<ul>
{% for b in current %}
<li>{{ build_line(b, True) }}
<form method="post" action="{{ b.buildurl }}/stop" class="command stopbuild" style="display:inline">
<input type="submit" value="Stop Build" />
<input type="hidden" name="url" value="{{ this_url }}" />
</form>
</li>
{% endfor %}
</ul>
{% else %}
<h3>No current builds</h3>
{% endif %}
</div>
<div id="recent">
<h3>Recent builds</h3>
{{ build_table(recent, True) }}
</div>
<div id="info">
{% if access_uri %}
<a href="{{ access_uri|e }}">Click to Access Slave</a>
{% endif %}
{% if admin %}
<h3>Administrator</h3>
<p>{{ admin|email }}</p>
{% endif %}
{% if host %}
<h3>Slave information</h3>
Buildbot-Slave {{ slave_version }}
<pre>{{ host|e }}</pre>
{% endif %}
<h2>Connection Status</h3>
<p>
{{ connect_count }} connection(s) in the last hour
{% if not slave.isConnected() %}
(not currently connected)
{% else %}
</p>
{% if authz.advertiseAction('gracefulShutdown') %}
<h2>Graceful Shutdown</h2>
{% if slave.getGraceful() %}
<p>Slave will shut down gracefully when it is idle.</p>
{% else %}
{{ forms.graceful_shutdown(shutdown_url, authz) }}
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,70 @@
{% extends "layouts/base.html" %}
{% block content %}
<h1>Buildslaves</h1>
<table class="zebra-striped">
<thead>
<tr>
<th>Name</th>
{%- if show_builder_column %}
<th>Builders</th>
{%- endif %}
<th>BuildBot</th>
<th>Admin</th>
<th>Last heard from</th>
<th>Connects/Hour</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for s in slaves %}
<tr class="{{ loop.cycle('alt','') }}">
<td><b><a href="{{ s.link }}">{{ s.name }}</a></b></td>
{%- if show_builder_column %}
<td>
{%- if s.builders %}
{%- for b in s.builders %}
<a href="{{ b.link }}">{{ b.name }}</a><br />
{%- endfor %}
{%- else %}
<span class="Warning">no builders</span>
{%- endif -%}
</td>
{%- endif %}
<td>{{ (s.version or '-')|e }}</td>
{%- if s.admin -%}
<td>{{ s.admin|email }}</td>
{%- else -%}
<td>-</td>
{%- endif -%}
<td>
{%- if s.last_heard_from_age -%}
{{ s.last_heard_from_age }}
{%- endif -%}
</td>
<td>
{{ s.connectCount }}
</td>
{% if s.connected %}
{% if s.running_builds %}
<td class="building">Running {{ s.running_builds }} build(s)</td>
{% else %}
<td class="idle">Idle</td>
{% endif %}
{% else %}
<td class="offline">Not connected</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -24,6 +24,7 @@
<li><a href="/">home</a></li>
<li><a href="/builders">builders</a></li>
<li><a href="/waterfall">waterfall</a></li>
<li><a href="/buildslaves">build slaves</a></li>
<li><a href="http://vagrantup.com">vagrant website</a></li>
</ul>
</div>

View File

@ -13,7 +13,7 @@
<tr class="{{ loop.cycle('alt', '') if loop }}">
<td>{{ b.time }}</td>
<td>{{ b.rev|shortrev(b.rev_repo) }}</td>
<td class="{{ b.class }}">{{ b.results }}</td>
<td class="results {{ b.class }}">{{ b.results }}</td>
{%- if include_builder %}
<td><a href="{{ b.builderurl }}">{{ b.builder_name }}</a></td>
{% endif %}
@ -24,7 +24,7 @@
{% macro build_table(builds, include_builder=False) %}
{% if builds %}
<table class="zebra-striped">
<table class="zebra-striped Module buildtable">
<thead>
<tr>
<th>Time</th>