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

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

Issue 6176591998615552: Fix handling of boolean keys (Closed)
Patch Set: Created Jan. 13, 2014, 7:12 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/fileStats.html
===================================================================
--- a/sitescripts/stats/template/fileStats.html
+++ b/sitescripts/stats/template/fileStats.html
@@ -100,17 +100,17 @@
<td>&nbsp;</td>
{%- endif %}
</tr>
{%- endmacro %}
{# Using selectattr filter would be nice but servers don't have Jinja 2.7 yet #}
{%- set filterFields = [] %}
{%- for field in fields %}
- {%- if field.filter and field.name in data and "true" in data[field.name] %}
+ {%- if field.filter and field.name in data and "True" in data[field.name] %}
{%- set dummy = filterFields.append(field) %}
{%- endif %}
{%- endfor %}
<div id="quickLinks">
{%- if filterFields|length > 0 %}
<a href="#overview">Overview</a>
{%- endif %}
@@ -133,18 +133,18 @@
<div class="block">
<table align="center">
<tr>
<th bgcolor="#ECECEC">Condition</th>
<th bgcolor="#66DDEE" colspan="2">Hits</th>
<th bgcolor="#2EA495" colspan="2">Bandwidth</th>
</tr>
{%- for field in filterFields %}
- {{row(field.title, data[field.name].true, params, chart=False,
- filtered_url=filtered_urls.get(field.name, {}).get("true", None))}}
+ {{row(field.title, data[field.name].True, params, chart=False,
+ filtered_url=filtered_urls.get(field.name, {}).get("True", None))}}
{%- endfor %}
{{row("Total", {"hits": params.totalhits, "bandwidth": params.totalbandwidth}, params, special=True, emph=True, chart=False)}}
</table>
</div>
{%- endif %}
{%- for field in fields %}
{%- if not field.filter and not field.hidden and field.name in data %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld