[llvm-commits] [zorg] r125910 - /zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html

Daniel Dunbar daniel at zuster.org
Fri Feb 18 08:43:13 PST 2011


Author: ddunbar
Date: Fri Feb 18 10:43:13 2011
New Revision: 125910

URL: http://llvm.org/viewvc/llvm-project?rev=125910&view=rev
Log:
llvmlab: Implement live dashboard using the new summary object.

Modified:
    zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html

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=125910&r1=125909&r2=125910&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html Fri Feb 18 10:43:13 2011
@@ -2,21 +2,41 @@
 {% block title %}dashboard{% endblock %}
 {% block body %}
 
+{# Get the current summary... #}
+{% set summary = config.summary.get_current_status() %}
+
 <h1>Welcome to the LLVM Lab Dashboard!</h1>
 
 <p>
-The most recent released revision is <b>r123456</b>
+{% set final_phase = summary[ci_config.validation_builder] %}
+
+{% if final_phase and final_phase.passing %}
+The most recent released revision is <b>r{{
+    final_phase.passing.source_stamp }}</b>
 validated at:
-<i>2011-06-01 10:34</i>
+<i>{{ final_phase.passing.end_time }}</i>
 (available <a href="#latest_release">below</a>).
-
-<p>
-The tree is currently: <b>open</b>.
+{% else %}
+<i><b>No release is currently available!</b></i>
+{% endif %}
 
 <p>
 <font color="#FF0000">
-<b>WARNING!</b> LLVM is currently failing the <i>Living On</i> checks. The tree
-will close in <b>35</b> minutes!
+  {% set is_failing = false %}
+  {% for phase in ci_config.phases %}
+  {% set phase_info = summary[phase.phase_builder] %}
+
+  {% if (phase_info and phase_info.completed and not is_failing
+         and phase_info.completed.result != 0) %}
+  {% set is_failing = true %}
+
+  <b>WARNING!</b> LLVM is currently failing the <i>{{ phase.name }}</i> checks.
+  The failures started in r{{ phase_info.failing.source_stamp }} at {{
+  phase_info.failing.end_time }}.
+
+  {% endif %}
+
+  {% endfor %}
 </font>
 
 
@@ -34,16 +54,29 @@
     {% endfor %}
   </tr>
   <tr>
+    {% set is_failing = false %}
+    {% for phase in ci_config.phases %}
+    {% set phase_info = summary[phase.phase_builder] %}
+
+    {# First, check if we have no status (no completed builds, or prior phase is
+       failing). #}
+    {% if not phase_info or not phase_info.completed or is_failing %}
+    <td align="center"><img src="/static/white.png" width="45" height="45"></td>
+    {% elif phase_info.completed.result == 0 %}
     <td align="center"><img src="/static/green.png" width="45" height="45"></td>
+    {% else %}
+    {% set is_failing = true %}
     <td align="center"><img src="/static/red.png" width="45" height="45"></td>
-    <td align="center"><img src="/static/red.png" width="45" height="45"></td>
-    <td align="center"><img src="/static/white.png" width="45" height="45"></td>
+    {% endif %}
+
+    {% endfor %}
   </tr>
 </table>
 
 <hr>
 
 {# The results table... #}
+
 <table>
 <thead>
   <tr>
@@ -55,35 +88,60 @@
 </thead>
 <tr>
   <td>Current</td>
-  <td>r123485</td>
-  <td>r123482</td>
-  <td>(blocked)</td>
-  <td>(blocked)</td>
+  {% for phase in ci_config.phases %}
+  {% set phase_info = summary[phase.phase_builder] %}
+
+  {% if phase_info.current %}
+  <td>r{{ phase_info.current[0].source_stamp }}</td>
+  {% else %}
+  <td>(idle)</td>
+  {% endif %}
+
+  {% endfor %}
 </tr>
 <tr>
   <td>Last Completed</td>
-  <td>r123482</td>
-  <td>r123477</td>
-  <td>r123457</td>
-  <td>r123456</td>
+  {% for phase in ci_config.phases %}
+  {% set phase_info = summary[phase.phase_builder] %}
+
+  {% if phase_info.completed %}
+  <td>r{{ phase_info.completed.source_stamp }}</td>
+  {% else %}
+  <td>(unknown)</td>
+  {% endif %}
+
+  {% endfor %}
 </tr>
 <tr>
   <td>First Failing</td>
-  <td> </td>
-  <td>r123475</td>
-  <td>r123457</td>
-  <td> </td>
+  {% for phase in ci_config.phases %}
+  {% set phase_info = summary[phase.phase_builder] %}
+
+  {% if phase_info.failing and
+        (not phase_info.passing or
+         phase_info.failing.number > phase_info.passing.number) %}
+  <td>r{{ phase_info.failing.source_stamp }}</td>
+  {% else %}
+  <td></td>
+  {% endif %}
+
+  {% endfor %}
 </tr>
 <tr>
   <td>Last Working</td>
-  <td>r123482</td>
-  <td>r123473</td>
-  <td>r123456</td>
-  <td>r123456</td>
+  {% for phase in ci_config.phases %}
+  {% set phase_info = summary[phase.phase_builder] %}
+
+  {% if phase_info.passing %}
+  <td>r{{ phase_info.passing.source_stamp }}</td>
+  {% else %}
+  <td>(unknown)</td>
+  {% endif %}
+
+  {% endfor %}
 </tr>
 </table>
 
-
 {# The builds archive table... #}
 <a name="latest_release">
   <h2>Latest Release</h2>





More information about the llvm-commits mailing list