[llvm-commits] [zorg] r125879 - in /zorg/trunk/llvmlab/llvmlab/ui: ci/views.py templates/dashboard.html
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:41:38 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:41:38 2011
New Revision: 125879
URL: http://llvm.org/viewvc/llvm-project?rev=125879&view=rev
Log:
llvmlab: Start sketching a hard-coded instance of the Config object, and migrate
dashboard to using the actual Config.
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=125879&r1=125878&r2=125879&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/ci/views.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/ci/views.py Fri Feb 18 10:41:38 2011
@@ -7,9 +7,25 @@
from flask import url_for
from flask import current_app
ci = flask.Module(__name__, url_prefix='/ci')
-print __name__
+
+from llvmlab.ci import config
+
+# Hard-coded current configuration.
+#
+# FIXME: Figure out how to get as much of this as possible dynamically. One
+# problem is how do we deal with changes to the CI infrastructure? Should we
+# load a config object per-revision, and try to be smart about caching it unless
+# things change? Can we report results across changing configs?
+phases = [
+ config.Phase("Sanity", 1, []),
+ config.Phase("Living On", 2, []),
+ config.Phase("Tree Health", 3, []),
+ config.Phase("Validation", 4, [])]
+builders = []
+published_builds = []
+g_config = config.Config(phases, builders, published_builds)
@ci.route('/')
def dashboard():
- return render_template("dashboard.html")
+ return render_template("dashboard.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=125879&r1=125878&r2=125879&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html Fri Feb 18 10:41:38 2011
@@ -30,10 +30,9 @@
<thead>
<tr>
<tr>
- <th>Sanity<br>(Phase 1)</th>
- <th>Living On<br>(Phase 2)</th>
- <th>Tree Health<br>(Phase 3)</th>
- <th>Validation<br>(Phase 4)</th>
+ {% for phase in ci_config.phases %}
+ <th>{{ phase.name }}<br>(Phase {{ phase.number }})</th>
+ {% endfor %}
</tr>
<tr>
<td align="center"><img src="/static/green.png" width="45" height="45"></td>
@@ -50,10 +49,9 @@
<thead>
<tr>
<th>Result Type</th>
- <th>Phase 1</th>
- <th>Phase 2</th>
- <th>Phase 3</th>
- <th>Phase 4</th>
+ {% for phase in ci_config.phases %}
+ <th>Phase {{ phase.number }}</th>
+ {% endfor %}
</tr>
</thead>
<tr>
More information about the llvm-commits
mailing list