Author: David Schneider <[email protected]>
Branch: buildbot-0.8.7
Changeset: r799:2d89931081d5
Date: 2013-04-25 19:22 +0200
http://bitbucket.org/pypy/buildbot/changeset/2d89931081d5/
Log: update calls to authz.advertiseAction
diff --git a/master/templates/build.html b/master/templates/build.html
--- a/master/templates/build.html
+++ b/master/templates/build.html
@@ -21,18 +21,18 @@
{% endif %}
{{ current_step }}
-
- {% if authz.advertiseAction('stopBuild') %}
+
+ {% if authz.advertiseAction('stopBuild', request) %}
<h2>Stop Build</h2>
{{ forms.stop_build(build_url+"/stop", authz, on_all=False, short=False,
label='This Build') }}
{% endif %}
{% else %}
<h2>Results:</h2>
- <p class="{{ result_css }} result">
+ <p class="{{ result_css }} result">
{{ b.getText()|join(' ')|capitalize }}
</p>
-
+
{% if b.getTestResults() %}
<h3><a href="{{ tests_link }}"/></h3>
{% endif %}
@@ -82,13 +82,13 @@
# TODO: turn this into a table, or some other sort of definition-list
# that doesn't take up quite so much vertical space
#}
-
+
<h2>BuildSlave:</h2>
-
-{% if slave_url %}
+
+{% if slave_url %}
<a href="{{ slave_url|e }}">{{ b.getSlavename()|e }}</a>
{% else %}
- {{ b.getSlavename()|e }}
+ {{ b.getSlavename()|e }}
{% endif %}
<h2>Reason:</h2>
@@ -111,7 +111,7 @@
{% for s in steps %}
<li>
<div class="{{ s.css_class }} result">
- <a href="{{ s.link }}">{{ s.name }}</a>
+ <a href="{{ s.link }}">{{ s.name }}</a>
{{ s.text }} <span style="float:right">{{ '( ' + s.time_to_run + '
)' if s.time_to_run else '' }}</span>
</div>
@@ -122,11 +122,11 @@
{% else %}
<li class="{{ item_class.next() }}">- no logs -</li>
{% endfor %}
-
+
{% for u in s.urls %}
<li class="{{ item_class.next() }}"><a href="{{ u.url }}">{{ u.logname
}}</a></li>
{% endfor %}
- </ol>
+ </ol>
</li>
{% endfor %}
</ol>
@@ -176,7 +176,7 @@
</table>
<!-- PyPy specific change: hide the "resubmit build section"
- {% if authz.advertiseAction('forceBuild') %}
+ {% if authz.advertiseAction('forceBuild', request) %}
<h3>Resubmit Build:</h3>
{{ forms.rebuild_build(build_url+"/rebuild", authz, exactly, ss) }}
{% endif %}
@@ -185,7 +185,7 @@
</div>
<br style="clear:both"/>
-
+
{% if ss.changes %}
<div class="column">
<h2>All Changes:</h2>
@@ -196,9 +196,9 @@
</li>
{% else %}
<li>no changes</li>
- {% endfor %}
+ {% endfor %}
</ol>
-</div>
+</div>
{% endif %}
{% endblock %}
diff --git a/master/templates/builder.html b/master/templates/builder.html
--- a/master/templates/builder.html
+++ b/master/templates/builder.html
@@ -26,42 +26,42 @@
{{ b.current_step }}
- {% if authz.advertiseAction('stopBuild') %}
+ {% if authz.advertiseAction('stopBuild', request) %}
{{ forms.stop_build(b.stop_url, authz, on_all=False, short=True,
label='Build') }}
- {% endif %}
+ {% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<h2>No current builds</h2>
-{% endif %}
-
+{% 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') %}
+ <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 %}
-
+ {% endif %}
+
{% if b.num_changes < 4 %}
{% for c in b.changes %}{{ c.revision|shortrev(c.repo) }}
(<a href="{{ c.url }}">{{ c.who }}</a>){% if not loop.last %},{% endif
%}
{% endfor %}
{% else %}
({{ b.num_changes }} changes)
- {% endif %}
+ {% endif %}
</li>
{% endfor %}
- </ul>
-
- {% if authz.advertiseAction('cancelPendingBuild') %}
+ </ul>
+
+ {% if authz.advertiseAction('cancelPendingBuild', requeset) %}
{{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz,
short=False, id='all') }}
- {% endif %}
-
+ {% endif %}
+
{% else %}
<h2>No Pending Build Requests</h2>
{% endif %}
@@ -89,7 +89,7 @@
<td class="idle">connected</td>
<td>{{ s.admin|email if s.admin else ""}}</td>
{% else %}
- <td class="offline">offline</td>
+ <td class="offline">offline</td>
<td/>
{% endif %}
</tr>
@@ -98,12 +98,12 @@
{% endfor %}
</table>
-{% if authz.advertiseAction('pingBuilder') %}
+{% if authz.advertiseAction('pingBuilder', request) %}
<h2>Ping slaves</h2>
{{ forms.ping_builder(builder_url+"/ping", authz) }}
{% endif %}
-{% if authz.advertiseAction('forceBuild') %}
+{% if authz.advertiseAction('forceBuild', request) %}
<h2>Force build</h2>
{{ forms.force_build(builder_url+"/force", authz, False) }}
{% endif %}
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit