[llvm-commits] [zorg] r125937 - in /zorg/trunk/llvmlab/llvmlab: ci/config.py ui/ci/views.py ui/templates/dashboard.html ui/templates/phase_description.html
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:45:00 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:45:00 2011
New Revision: 125937
URL: http://llvm.org/viewvc/llvm-project?rev=125937&view=rev
Log:
llvmlab: Add help links to access phase descriptions.
Added:
zorg/trunk/llvmlab/llvmlab/ui/templates/phase_description.html
Modified:
zorg/trunk/llvmlab/llvmlab/ci/config.py
zorg/trunk/llvmlab/llvmlab/ui/ci/views.py
zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html
Modified: zorg/trunk/llvmlab/llvmlab/ci/config.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ci/config.py?rev=125937&r1=125936&r2=125937&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ci/config.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ci/config.py Fri Feb 18 10:45:00 2011
@@ -17,21 +17,23 @@
raise ValueError, "Unknown version"
return Phase(data['name'], data['number'],
- data['phase_builder'], data['builder_names'])
+ data['phase_builder'], data['builder_names'],
+ data['description'])
def todata(self):
return { 'version' : 0,
'name' : self.name,
'number' : self.number,
'phase_builder' : self.phase_builder,
- 'builder_names' : self.builder_names}
+ 'builder_names' : self.builder_names,
+ 'description' : self.description}
- def __init__(self, name, number, phase_builder, builder_names):
+ def __init__(self, name, number, phase_builder, builder_names, description):
self.name = name
self.number = number
self.phase_builder = phase_builder
self.builder_names = builder_names
-
+ self.description = description
class Builder(util.simple_repr_mixin):
"""
Modified: zorg/trunk/llvmlab/llvmlab/ui/ci/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/ci/views.py?rev=125937&r1=125936&r2=125937&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/ci/views.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/ci/views.py Fri Feb 18 10:45:00 2011
@@ -47,6 +47,18 @@
return render_template("buildbot_monitor.html",
bb_status=current_app.config.status)
+ at ci.route('/phase_description/<int:index>')
+def phase_description(index):
+ cfg = current_app.config.summary.config
+
+ # Validate the phase.
+ if index >= len(cfg.phases):
+ abort(404)
+
+ # Get the phase.
+ phase = cfg.phases[index]
+ return render_template("phase_description.html", phase=phase)
+
@ci.route('/times')
@ci.route('/times/<int:index>')
def phase_timing(index=None):
Modified: zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html?rev=125937&r1=125936&r2=125937&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html Fri Feb 18 10:45:00 2011
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% macro help_link(key) %}
+{% macro help_link(url) %}
<a href='#'
- onclick='show_popup("help", "./help/{{ key }}", event); return false;'
+ onclick='show_popup("help", "{{ url }}", event); return false;'
title='Help'
class='help-link'
target="_blank">?</a>
@@ -205,7 +205,9 @@
{% for phase in ci_config.phases %}
{% set phase_info = summary[phase.phase_builder] %}
- <th>{{ phase.name }}<br>(Phase {{ phase.number }})</th>
+ <th>{{ phase.name }}{{
+ help_link(url_for('phase_description', index=loop.index0)) }}
+ <br>(Phase {{ phase.number }})</th>
{% endfor %}
</tr>
<tr>
Added: zorg/trunk/llvmlab/llvmlab/ui/templates/phase_description.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/phase_description.html?rev=125937&view=auto
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/phase_description.html (added)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/phase_description.html Fri Feb 18 10:45:00 2011
@@ -0,0 +1,5 @@
+{# Fragment template for rendering a phase description. #}
+
+<pre>
+{{ phase.description }}
+</pre>
More information about the llvm-commits
mailing list