[llvm-commits] [LNT] r167745 - in /lnt/trunk/lnt/server: reporting/dailyreport.py ui/templates/reporting/daily_report.html
Daniel Dunbar
daniel at zuster.org
Mon Nov 12 12:06:41 PST 2012
Author: ddunbar
Date: Mon Nov 12 14:06:41 2012
New Revision: 167745
URL: http://llvm.org/viewvc/llvm-project?rev=167745&view=rev
Log:
dailyreport: Produce an error report when no runs are available.
Modified:
lnt/trunk/lnt/server/reporting/dailyreport.py
lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
Modified: lnt/trunk/lnt/server/reporting/dailyreport.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/dailyreport.py?rev=167745&r1=167744&r2=167745&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/dailyreport.py (original)
+++ lnt/trunk/lnt/server/reporting/dailyreport.py Mon Nov 12 14:06:41 2012
@@ -21,6 +21,7 @@
self.for_mail = for_mail
# Computed values.
+ self.error = None
self.next_day = None
self.prior_days = None
self.machine_runs = None
@@ -143,6 +144,12 @@
relevant_run_ids = [r.id for r in relevant_runs]
+ # If there are no relevant runs, just stop processing (the report will
+ # generate an error).
+ if not relevant_run_ids:
+ self.error = "no runs to display in selected date range"
+ return
+
# Get the set all tests reported in the recent runs.
self.reporting_tests = ts.query(ts.Test).filter(
sqlalchemy.sql.exists('*', sqlalchemy.sql.and_(
Modified: lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html?rev=167745&r1=167744&r2=167745&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html Mon Nov 12 14:06:41 2012
@@ -29,6 +29,13 @@
(report.day_start_offset.seconds // 60) % 60,)}})
</center>
+{% if report.error is not none %}
+
+<p>An error was encountered while producing the daily report: {{
+ report.error }}.</p>
+
+{% else %}
+
{# Generate the table showing which run orders we are reporting on, for each
machine. #}
<h3 style={{ "styles.h3" }}>Reported Machine Order</h3>
@@ -140,6 +147,8 @@
{{ "</table>" if not report.for_mail }}
{% endfor %}
+{% endif %}
+
{% if not only_html_body %}
</body>
</html>
More information about the llvm-commits
mailing list