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

Side by Side Diff: sitescripts/stats/template/fileStats.html

Issue 5664623214723072: Issue 1560 - ZeroDivisionError in sitescripts.stats.bin.pagegenerator (Closed)
Patch Set: Better work-around for zero divisors Created Nov. 12, 2014, 8:55 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sitescripts/stats/template/fileOverview.html ('k') | sitescripts/stats/template/main.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 - This file is part of the Adblock Plus web scripts, 2 - This file is part of the Adblock Plus web scripts,
3 - Copyright (C) 2006-2014 Eyeo GmbH 3 - Copyright (C) 2006-2014 Eyeo GmbH
4 - 4 -
5 - Adblock Plus is free software: you can redistribute it and/or modify 5 - Adblock Plus is free software: you can redistribute it and/or modify
6 - it under the terms of the GNU General Public License version 3 as 6 - it under the terms of the GNU General Public License version 3 as
7 - published by the Free Software Foundation. 7 - published by the Free Software Foundation.
8 - 8 -
9 - Adblock Plus is distributed in the hope that it will be useful, 9 - Adblock Plus is distributed in the hope that it will be useful,
10 - but WITHOUT ANY WARRANTY; without even the implied warranty of 10 - but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 <div class="flag {{name}}"></div> {{name|countryname}} <div class="c ountrycode">{{name}}</div> 81 <div class="flag {{name}}"></div> {{name|countryname}} <div class="c ountrycode">{{name}}</div>
82 {%- else -%} 82 {%- else -%}
83 {{name}} 83 {{name}}
84 {%- endif -%} 84 {%- endif -%}
85 85
86 {%- if filtered_url %} 86 {%- if filtered_url %}
87 </a> 87 </a>
88 {%- endif %} 88 {%- endif %}
89 </td> 89 </td>
90 <td align="right">{{value.hits}}</td> 90 <td align="right">{{value.hits}}</td>
91 <td align="right">{{(value.hits / params.totalhits * 100)|round(precisio n=1)}}%</td> 91 <td align="right">{{value.hits|percentage(params.totalhits)|round(precis ion=1)}}%</td>
92 <td align="right">{{value.bandwidth|bytes}}</td> 92 <td align="right">{{value.bandwidth|bytes}}</td>
93 <td align="right">{{(value.bandwidth / params.totalbandwidth * 100)|roun d(precision=1)}}%</td> 93 <td align="right">{{value.bandwidth|percentage(params.totalbandwidth)|ro und(precision=1)}}%</td>
94 {%- if chart %} 94 {%- if chart %}
95 <td class="chart"> 95 <td class="chart">
96 <div class="hitsChart" style="width: {{(value.hits / params.maxhits * 100)|round(method='ceil')|int}}px;"></div><br /> 96 <div class="hitsChart" style="width: {{value.hits|percentage(params. maxhits)|round(method='ceil')|int}}px;"></div><br />
97 <div class="bandwidthChart" style="width: {{(value.bandwidth / param s.maxbandwidth * 100)|round(method='ceil')|int}}px;"></div> 97 <div class="bandwidthChart" style="width: {{value.bandwidth|percenta ge(params.maxbandwidth)|round(method='ceil')|int}}px;"></div>
98 </td> 98 </td>
99 {%- else %} 99 {%- else %}
100 <td>&nbsp;</td> 100 <td>&nbsp;</td>
101 {%- endif %} 101 {%- endif %}
102 </tr> 102 </tr>
103 {%- endmacro %} 103 {%- endmacro %}
104 104
105 {# Using selectattr filter would be nice but servers don't have Jinja 2.7 ye t #} 105 {# Using selectattr filter would be nice but servers don't have Jinja 2.7 ye t #}
106 {%- set filterFields = [] %} 106 {%- set filterFields = [] %}
107 {%- for field in fields %} 107 {%- for field in fields %}
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 {%- endif %} 193 {%- endif %}
194 {%- if field.name == "day" and filterFields|length == 0 %} 194 {%- if field.name == "day" and filterFields|length == 0 %}
195 {{row("Total", {"hits": params.totalhits, "bandwidth": params.tota lbandwidth}, params, special=True, emph=True, chart=False)}} 195 {{row("Total", {"hits": params.totalhits, "bandwidth": params.tota lbandwidth}, params, special=True, emph=True, chart=False)}}
196 {%- endif %} 196 {%- endif %}
197 </table> 197 </table>
198 </div> 198 </div>
199 {%- endif %} 199 {%- endif %}
200 {%- endfor %} 200 {%- endfor %}
201 </body> 201 </body>
202 </html> 202 </html>
OLDNEW
« no previous file with comments | « sitescripts/stats/template/fileOverview.html ('k') | sitescripts/stats/template/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld