[zorg] r185220 - Added a custom builder.html template so we can provide a text box form to select the number of recent builds shown.
Michael Gottesman
mgottesman at apple.com
Fri Jun 28 14:35:22 PDT 2013
Author: mgottesman
Date: Fri Jun 28 16:35:21 2013
New Revision: 185220
URL: http://llvm.org/viewvc/llvm-project?rev=185220&view=rev
Log:
Added a custom builder.html template so we can provide a text box form to select the number of recent builds shown.
This allows you to change the number of shown recent builds without messing with
the buildbot url.
Added:
zorg/trunk/buildbot/llvmlab/master/templates/builder.html
Added: zorg/trunk/buildbot/llvmlab/master/templates/builder.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/buildbot/llvmlab/master/templates/builder.html?rev=185220&view=auto
==============================================================================
--- zorg/trunk/buildbot/llvmlab/master/templates/builder.html (added)
+++ zorg/trunk/buildbot/llvmlab/master/templates/builder.html Fri Jun 28 16:35:21 2013
@@ -0,0 +1,147 @@
+{% from 'build_line.html' import build_table %}
+{% import 'forms.html' as forms %}
+
+{% extends "layout.html" %}
+
+{% block head %}
+ {{ super() }}
+
+ <script lang="javascript" type="text/javascript">
+ function submit_num_build_form(form) {
+ var input = document.getElementById('num_build_field');
+ if (input === null) {
+ alert("An internal error occured. Can not update number of shown builds.");
+ return false;
+ }
+
+ input = input.value;
+ if (input === null) {
+ alert("An internal error occured. Can not update number of shown builds.");
+ return false;
+ }
+
+ var input_as_int = parseInt(input, 10);
+ if (input_as_int === null || isNaN(input_as_int) || input_as_int.toString() != input) {
+ alert("Invalid input. Number of shown builds must be an integral value.");
+ return false;
+ }
+ return true;
+ }
+ </script>
+{% endblock %}
+
+{% block content %}
+
+<h1>Builder {{ name }}</h1>
+
+<p>(<a href="{{ path_to_root }}waterfall?show={{ name }}">view in waterfall</a>)</p>
+
+<div class="column">
+
+{% if current %}
+ <h2>Current Builds:</h2>
+ <ul>
+ {% for b in current %}
+ <li><a href="{{ b.link }}">{{ b.num }}</a>
+ {% if b.when %}
+ ETA: {{ b.when_time }} [{{ b.when }}]
+ {% endif %}
+
+ {{ b.current_step }}
+
+ {% if authz.advertiseAction('stopBuild', request) %}
+ {{ forms.stop_build(b.stop_url, authz, on_all=False, short=True, label='Build') }}
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+{% else %}
+ <h2>No current builds</h2>
+{% endif %}
+
+{% if pending %}
+ <h2>Pending Build Requests:</h2>
+ <ul>
+ {% for b in pending %}
+ <li><small>({{ b.when }}, waiting {{ b.delay }})</small>
+
+ {% if authz.advertiseAction('cancelPendingBuild', request) %}
+ {{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz, short=True, id=b.id) }}
+ {% endif %}
+
+ {% if b.num_changes < 4 %}
+ {% for c in b.changes %}{{ c.revision|shortrev(c.repo) }}
+ (<a href="{{ c.url }}">{{ c.who|email }}</a>){% if not loop.last %},{% endif %}
+ {% endfor %}
+ {% else %}
+ ({{ b.num_changes }} changes)
+ {% endif %}
+
+ {% if 'owner' in b.properties %}
+ <b>Forced build</b>
+ by {{b.properties['owner'][0]}}
+ <small>{{b.properties['reason'][0]}}</small>
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+
+ {% if authz.advertiseAction('cancelPendingBuild', request) %}
+ {{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz, short=False, id='all') }}
+ {% endif %}
+
+{% else %}
+ <h2>No Pending Build Requests</h2>
+{% endif %}
+
+<h2>Recent Builds:</h2>
+
+{{ build_table(recent) }}
+
+</div>
+<div class="column">
+
+<h2>Buildslaves:</h2>
+<table class="info">
+{% if slaves %}
+<tr>
+ <th>Name</th>
+ <th>Status</th>
+ <th>Admin</th>
+</tr>
+{% endif %}
+{% for s in slaves %}
+ <tr class="{{ loop.cycle('alt', '') }}">
+ <td><b><a href="{{ s.link|e }}">{{ s.name|e }}</a></b></td>
+ {% if s.connected %}
+ <td class="idle">connected</td>
+ <td>{{ s.admin|email if s.admin else ""}}</td>
+ {% else %}
+ <td class="offline">offline</td>
+ <td/>
+ {% endif %}
+ </tr>
+{% else %}
+ <td>no slaves attached</td>
+{% endfor %}
+</table>
+
+{% if authz.advertiseAction('pingBuilder', request) %}
+ <h2>Ping slaves</h2>
+ {{ forms.ping_builder(builder_url+"/ping", authz) }}
+{% endif %}
+
+{% if authz.advertiseAction('forceBuild', request) and force_schedulers != {} %}
+ <h2>Force build</h2>
+ {{ forms.force_build(builder_url+"/force", authz, request, False, force_schedulers=force_schedulers,default_props=default_props) }}
+{% endif %}
+
+ <h2>Utility</h2>
+ <form>
+ <label>Number Of Builds To Display:</label> <input id="num_build_field" type="text" name="numbuilds" value="{{ recent|length }}">
+ <input type="submit" value="Update" onclick="return submit_num_build_form(this.form);">
+ </form>
+
+</div>
+
+{% endblock %}
More information about the llvm-commits
mailing list