buildbot: Update change page

This commit is contained in:
Mitchell Hashimoto 2011-11-19 13:30:10 -08:00
parent b11db62677
commit 21c403965b
3 changed files with 40 additions and 17 deletions

View File

@ -0,0 +1,15 @@
{% import 'macros/forms.html' as forms %}
{% from "macros/change.html" import change with context %}
{% extends "layouts/base.html" %}
{% block content %}
<h1>{{ pageTitle }}</h1>
{{ change(c) }}
{% if authz.advertiseAction('stopChange') %}
<h3>Cancel Builds For Change:</h3>
{{ forms.stop_change_builds("/builders/_all/stopchangeall", c.number, authz) }}
{% endif %}
{% endblock %}

View File

@ -1,46 +1,54 @@
{% macro change(c) %} {% macro change(c) %}
<table class="info"> <table class="zebra-striped">
{% set row_class=cycler('alt','') %} <tbody>
<tr class="{{ row_class.next() }}"> <tr>
<td class="left">Changed by</td> <td class="left">Changed by</td>
<td><b>{{ c.who|email }}</b></td> <td><b>{{ c.who|email }}</b></td>
</tr> </tr>
<tr class="{{ row_class.next() }}">
<tr>
<td class="left">Changed at</td> <td class="left">Changed at</td>
<td><b>{{ c.at }}</b></td> <td><b>{{ c.at }}</b></td>
</tr> </tr>
{% if c.repository %} {% if c.repository %}
<tr class="{{ row_class.next() }}"> <tr>
<td class="left">Repository</td> <td class="left">Repository</td>
<td><b>{{ c.repository|repolink }}</b></td> <td><b>{{ c.repository|repolink }}</b></td>
</tr> </tr>
{% endif %} {% if c.project %} {% endif %}
<tr class="{{ row_class.next() }}">
{% if c.project %}
<tr>
<td class="left">Project</td> <td class="left">Project</td>
<td><b>{{ c.project|projectlink }}</b></td> <td><b>{{ c.project|projectlink }}</b></td>
</tr> </tr>
{% endif %} {% if c.branch %} {% endif %}
<tr class="{{ row_class.next() }}">
{% if c.branch %}
<tr>
<td class="left">Branch</td> <td class="left">Branch</td>
<td><b>{{ c.branch|e }}</b></td> <td><b>{{ c.branch|e }}</b></td>
</tr> </tr>
{% endif %} {% if c.rev %} {% endif %}
<tr class="{{ row_class.next() }}">
{% if c.rev %}
<tr>
<td class="left">Revision</td> <td class="left">Revision</td>
<td>{%- if c.revlink -%}<a href="{{ c.revlink }}">{{ c.rev|e }}</a> <td>{%- if c.revlink -%}<a href="{{ c.revlink }}">{{ c.rev|e }}</a>
{%- else -%}{{ c.rev|revlink(c.repository) }} {%- endif -%}</td> {%- else -%}{{ c.rev|revlink(c.repository) }} {%- endif -%}</td>
</tr> </tr>
{% endif %} {% endif %}
</tbody>
</table> </table>
{% if c.comments %} {% if c.comments %}
<h3>Comments</h3> <h3>Comments</h3>
<pre class="comments">{{ c.comments|changecomment(c.project) }}</pre> <pre>{{ c.comments|changecomment(c.project) }}</pre>
{% endif %} {% endif %}
<h3 class="files">Changed files</h3> <h3>Changed files</h3>
<ul> <ul>
{% for f in c.files -%} {% for f in c.files -%}
<li class="{{ loop.cycle('alt', '') }}">{%- if f.url %}<a <li class="{{ loop.cycle('alt', '') }}">{%- if f.url %}<a
@ -56,9 +64,9 @@
{% if c.properties %} {% if c.properties %}
<h3>Properties</h3> <h3>Properties</h3>
<table class="info"> <table class="zebra-striped">
{% for p in c.properties %} {% for p in c.properties %}
<tr class="{{ loop.cycle('alt') }}"> <tr>
<td class="left">{{ p[0]|capitalize|e }}</td> <td class="left">{{ p[0]|capitalize|e }}</td>
<td>{{ p[1]|e }}</td> <td>{{ p[1]|e }}</td>
</tr> </tr>

View File

@ -25,9 +25,9 @@
<tr> <tr>
<th colspan="2">Current Activity</th> <th colspan="2">Current Activity</th>
{% for b in builders %} {% for b in builders %}
<th class="{{ b.status_class }}"> <td class="{{ b.status_class }}">
{{ "<br />".join(b.status) }} {{ "<br />".join(b.status) }}
</th> </td>
{% endfor %} {% endfor %}
</tr> </tr>