Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/stats/template/fileOverview.html

Issue 5080063527616512: [stats] Wrong sort order on the month overview page (Closed)
Patch Set: Created March 13, 2014, 10:24 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/stats/template/fileOverview.html
===================================================================
--- a/sitescripts/stats/template/fileOverview.html
+++ b/sitescripts/stats/template/fileOverview.html
@@ -42,20 +42,20 @@
<div class="block">
<table align="center" style="margin-bottom: 20px;">
<tr>
<th bgcolor="#ECECEC">Month</th>
<th bgcolor="#66DDEE">Hits</th>
<th bgcolor="#2EA495">Bandwidth</th>
<th>&nbsp;</th>
</tr>
- {%- set data = data.items() %}
+ {%- set data = data|dictsort(true) %}
{%- set maxhits = data|maxhits %}
{%- set maxbandwidth = data|maxbandwidth %}
- {%- for name, value in data %}
+ {%- for name, value in data|reverse %}
<tr>
<td><a href="{{value.url}}">{{name|monthname}}</a></td>
<td align="right">{{value.hits}}</td>
<td align="right">{{value.bandwidth|bytes}}</td>
<td class="chart">
<div class="hitsChart" style="width: {{(value.hits / maxhits * 100)|round(method='ceil')|int}}px;"></div><br />
<div class="bandwidthChart" style="width: {{(value.bandwidth / maxbandwidth * 100)|round(method='ceil')|int}}px;"></div>
</td>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld