[llvm-commits] [LNT] r165556 - in /lnt/trunk/lnt: lnttool/main.py server/reporting/dailyreport.py server/ui/templates/reporting/daily_report.html server/ui/templates/v4_daily_report.html
Daniel Dunbar
daniel at zuster.org
Tue Oct 9 15:43:26 PDT 2012
Author: ddunbar
Date: Tue Oct 9 17:43:26 2012
New Revision: 165556
URL: http://llvm.org/viewvc/llvm-project?rev=165556&view=rev
Log:
dailyreport: Pass in the testsuite base url.
- We can't use Flask url generation functions in an arbitrary context.
Modified:
lnt/trunk/lnt/lnttool/main.py
lnt/trunk/lnt/server/reporting/dailyreport.py
lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
lnt/trunk/lnt/server/ui/templates/v4_daily_report.html
Modified: lnt/trunk/lnt/lnttool/main.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/main.py?rev=165556&r1=165555&r2=165556&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/main.py (original)
+++ lnt/trunk/lnt/lnttool/main.py Tue Oct 9 17:43:26 2012
@@ -312,9 +312,10 @@
report.build()
note("generating HTML report...")
+ ts_url = "%s/db_%s/v4/%s" % (config.zorgURL, opts.database, opts.testsuite)
subject = "Daily Report: %04d-%02d-%02d" % (
report.year, report.month, report.day)
- html_report = report.render(only_html_body=False)
+ html_report = report.render(ts_url, only_html_body=False)
# Form the multipart email message.
msg = email.mime.multipart.MIMEMultipart('alternative')
Modified: lnt/trunk/lnt/server/reporting/dailyreport.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/dailyreport.py?rev=165556&r1=165555&r2=165556&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/dailyreport.py (original)
+++ lnt/trunk/lnt/server/reporting/dailyreport.py Tue Oct 9 17:43:26 2012
@@ -164,7 +164,7 @@
field_results.append((test, visible_results))
self.result_table.append((field, field_results))
- def render(self, only_html_body=True):
+ def render(self, ts_url, only_html_body=True):
env = lnt.server.ui.app.create_jinja_environment()
template = env.get_template('reporting/daily_report.html')
@@ -187,4 +187,4 @@
return template.render(
report=self, styles=styles, analysis=lnt.server.reporting.analysis,
- only_html_body=only_html_body)
+ ts_url=ts_url, only_html_body=only_html_body)
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=165556&r1=165555&r2=165556&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html Tue Oct 9 17:43:26 2012
@@ -55,7 +55,6 @@
{% endmacro %}
{# Generate the table showing the raw sample data. #}
-{% set graph_base=v4_url_for('v4_graph') %}
{% for field,field_results in report.result_table|reverse %}
<h3>Result Table ({{ field.name }})</h3>
<table border="1" style="{{ styles.table }}">
@@ -77,7 +76,7 @@
<tr>
<td style="{{ styles.td }}"> </td>
<td style="{{ styles.td }}"><a href="{{
- graph_base}}?plot.0={{machine.id}}.{{test.id}}.{{field.index}}">{{
+ ts_url}}/graph?plot.0={{machine.id}}.{{test.id}}.{{field.index}}">{{
machine.name}}</a></td>
<td style="{{ styles.td }}">{{ day_results[-1].current }}</td>
{% for day_result in day_results[:-1]|reverse %}
Modified: lnt/trunk/lnt/server/ui/templates/v4_daily_report.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_daily_report.html?rev=165556&r1=165555&r2=165556&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_daily_report.html Tue Oct 9 17:43:26 2012
@@ -23,6 +23,6 @@
(report.day_start_offset.seconds // 60) % 60,)}})
</center>
-{{ report.render()|safe }}
+{{ report.render(v4_url_for('index'))|safe }}
{% endblock %}
More information about the llvm-commits
mailing list