[llvm-commits] [zorg] r125912 - in /zorg/trunk/llvmlab/llvmlab/ui: ci/views.py templates/dashboard.html templates/dashboard_popup.html templates/phase_popup.html
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:43:22 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:43:22 2011
New Revision: 125912
URL: http://llvm.org/viewvc/llvm-project?rev=125912&view=rev
Log:
llvmlab: Sketch the phase popup.
Added:
zorg/trunk/llvmlab/llvmlab/ui/templates/phase_popup.html
Removed:
zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard_popup.html
Modified:
zorg/trunk/llvmlab/llvmlab/ui/ci/views.py
zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html
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=125912&r1=125911&r2=125912&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/ci/views.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/ci/views.py Fri Feb 18 10:43:22 2011
@@ -76,6 +76,24 @@
def dashboard():
return render_template("dashboard.html", ci_config=g_config)
+ at ci.route('/phase/<int:index>/<source_stamp>')
+def phase_popup(index, source_stamp):
+ # Validate the phase.
+ if index >= len(g_config.phases):
+ abort(404)
+
+ # Get the phase.
+ phase = g_config.phases[index]
+
+ # Lookup the latest builds associated with this revision.
+ phased_builds = dict(
+ (builder, [b for b in current_app.config.status.builders.get(builder,[])
+ if b.source_stamp == source_stamp])
+ for builder in phase.builder_names)
+ return render_template("phase_popup.html", ci_config=g_config,
+ phase = phase, source_stamp = source_stamp,
+ phased_builds = phased_builds)
+
@ci.route('/latest_release')
def latest_release():
return render_template("latest_release.html", ci_config=g_config)
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=125912&r1=125911&r2=125912&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html Fri Feb 18 10:43:22 2011
@@ -142,8 +142,4 @@
</tr>
</table>
-<h1>Example Phase Popups</h1>
-
-{% include "dashboard_popup.html" %}
-
{% endblock %}
Removed: zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard_popup.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard_popup.html?rev=125911&view=auto
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard_popup.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard_popup.html (removed)
@@ -1,11 +0,0 @@
-{# Fragment template for rendering an individual phase pop-up #}
-<h3>Phase 4 - r123456</h3>
-<table>
- <thead>
- <tr><th>Builder</th><th>Status</th></tr>
- </thead>
- <tr><td>clang-i386-darwin10-RA-fnt</td><td>PASS</td></tr>
- <tr><td>clang-x86_64-darwin10-RA-fnt</td><td>PASS</td></tr>
- <tr><td>clang-i386-linux-RA-fnt</td><td>PASS</td></tr>
- <tr><td>clang-x86_64-linux-RA-fnt</td><td>PASS</td></tr>
-</table>
Added: zorg/trunk/llvmlab/llvmlab/ui/templates/phase_popup.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/phase_popup.html?rev=125912&view=auto
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/phase_popup.html (added)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/phase_popup.html Fri Feb 18 10:43:22 2011
@@ -0,0 +1,24 @@
+{# Fragment template for rendering an individual phase pop-up #}
+
+<h3>Phase {{ phase.number }} {{ phase.name }} - r{{ source_stamp }}</h3>
+<table>
+ <thead>
+ <tr><th>Builder</th><th>Status</th></tr>
+ </thead>
+ {% for name,builds in phased_builds|dictsort %}
+ <tr>
+ <td>{{ name }}</td>
+ <td>
+ {% for build in builds %}
+ {% if build.end_time == None %}
+ RUNNING
+ {% elif build.result == 0 %}
+ PASS
+ {% else %}
+ FAIL
+ {% endif %}
+ {% endfor %}
+ </td>
+ </tr>
+ {% endfor %}
+</table>
More information about the llvm-commits
mailing list