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

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

Issue 5662084981325824: Fixed last day of month being below the fold and got rid of a duplicated constant (Closed)
Patch Set: Created Jan. 13, 2014, 7: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 | « sitescripts/stats/common.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/stats/template/fileStats.html
===================================================================
--- a/sitescripts/stats/template/fileStats.html
+++ b/sitescripts/stats/template/fileStats.html
@@ -156,36 +156,36 @@
<div id="{{field.name}}" class="block_title">{{field.title}}</div>
<div class="block">
<table align="center">
<tr>
<th bgcolor="#ECECEC">{{field.coltitle}}</th>
<th bgcolor="#66DDEE" colspan="2">Hits</th>
<th bgcolor="#2EA495" colspan="2">Bandwidth</th>
</tr>
- {%- for name, value in items[0:30] %}
+ {%- for name, value in items[0:field|defaultcount] %}
{{row(name, value, params, special=name|isspecial(field),
filtered_url=filtered_urls.get(field.name, {}).get(name, None))}}
{%- endfor %}
- {%- if count > 30 %}
+ {%- if count > field|defaultcount %}
<tr id="{{field.name}}_showAll" class="special">
<td>
Other
<a href="#" class="showAllLink" data-hide="{{field.name}}_showAll" data-show="{{field.name}}_additionalItems">
Show all
</a>
</td>
- <td align="right">{{items[30:]|sumhits}}</td>
+ <td align="right">{{items[field|defaultcount:]|sumhits}}</td>
<td>&nbsp;</td>
- <td align="right">{{items[30:]|sumbandwidth|bytes}}</td>
+ <td align="right">{{items[field|defaultcount:]|sumbandwidth|bytes}}</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tbody id="{{field.name}}_additionalItems" style="display: none;">
- {%- for name, value in items[30:] %}
+ {%- for name, value in items[field|defaultcount:] %}
{{row(name, value, params, special=name|isspecial(field),
filtered_url=filtered_urls.get(field.name, {}).get(name, None))}}
{%- endfor %}
</tbody>
{%- endif %}
{%- if field.showaverage %}
{%- set avghits = (params.totalhits / count)|int %}
{%- set avgbandwidth = (params.totalbandwidth / count)|int %}
« no previous file with comments | « sitescripts/stats/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld