[LNT] r178570 - Changed the daily report ui to use the html query string argument day_start in its url links.
Michael Gottesman
mgottesman at apple.com
Tue Apr 2 13:13:07 PDT 2013
Author: mgottesman
Date: Tue Apr 2 15:13:06 2013
New Revision: 178570
URL: http://llvm.org/viewvc/llvm-project?rev=178570&view=rev
Log:
Changed the daily report ui to use the html query string argument day_start in its url links.
This is necessary since when you currently get a daily report email, the links
provided therein take you to the LNT daily report page for the proper day but
the offset is set at 16:00. This makes copy pasting the report url into an email
more difficult than it should be.
Modified:
lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
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=178570&r1=178569&r2=178570&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html Tue Apr 2 15:13:06 2013
@@ -7,25 +7,33 @@
<body style="{{ styles['body'] }}">
{% endif %}
+{% set hour_offset = report.prior_days[0].day_start_offset.seconds // 3600 %}
+
<center><h2>{#
#}(<a href="{{ts_url}}/daily_report/{{
report.prior_days[1].year}}/{{
report.prior_days[1].month}}/{{
- report.prior_days[1].day}}">prev</a>){#
+ report.prior_days[1].day}}?day_start={{
+ hour_offset
+ }}">prev</a>){#
#}<b> <a href="{{ts_url}}/daily_report/{{
report.prior_days[0].year}}/{{
report.prior_days[0].month}}/{{
- report.prior_days[0].day}}">{#
+ report.prior_days[0].day}}?day_start={{
+ hour_offset
+ }}">{#
#}Daily Report {{ '%04d-%02d-%02d' % (
report.prior_days[0].year, report.prior_days[0].month,
report.prior_days[0].day) }}</a> </b>{#
#}(<a href="{{ts_url}}/daily_report/{{
report.next_day.year}}/{{
report.next_day.month}}/{{
- report.next_day.day}}">next</a>){#
+ report.next_day.day}}?day_start={{
+ hour_offset
+ }}">next</a>){#
#}</h2>
(day start is considered to be at UTC+{{ "%02d:%02d" % (
- (report.day_start_offset.seconds // 3600),
+ hour_offset,
(report.day_start_offset.seconds // 60) % 60,)}})
</center>
More information about the llvm-commits
mailing list