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

Delta Between Two Patch Sets: sitescripts/stats/template/main.html

Issue 5664623214723072: Issue 1560 - ZeroDivisionError in sitescripts.stats.bin.pagegenerator (Closed)
Left Patch Set: Created Nov. 12, 2014, 7:43 p.m.
Right 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:
Right: Side by side diff | Download
« no previous file with change/comment | « sitescripts/stats/template/fileStats.html ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 </tr> 53 </tr>
54 {%- set data = data|sortfield("hits") %} 54 {%- set data = data|sortfield("hits") %}
55 {%- set maxhits = data|maxhits %} 55 {%- set maxhits = data|maxhits %}
56 {%- set maxbandwidth = data|maxbandwidth %} 56 {%- set maxbandwidth = data|maxbandwidth %}
57 {%- for name, value in data %} 57 {%- for name, value in data %}
58 <tr> 58 <tr>
59 <td><a href="{{value.url}}">{{name}}</a></td> 59 <td><a href="{{value.url}}">{{name}}</a></td>
60 <td align="right">{{value.hits}}</td> 60 <td align="right">{{value.hits}}</td>
61 <td align="right">{{value.bandwidth|bytes}}</td> 61 <td align="right">{{value.bandwidth|bytes}}</td>
62 <td class="chart"> 62 <td class="chart">
63 <div class="hitsChart" style="width: {{(value.hits / maxhits * 100)|ro und(method='ceil')|int}}px;"></div><br /> 63 <div class="hitsChart" style="width: {{value.hits|percentage(maxhits)| round(method='ceil')|int}}px;"></div><br />
64 <div class="bandwidthChart" style="width: {{(value.bandwidth / maxband width * 100)|round(method='ceil')|int}}px;"></div> 64 <div class="bandwidthChart" style="width: {{value.bandwidth|percentage (maxbandwidth)|round(method='ceil')|int}}px;"></div>
65 </td> 65 </td>
66 </tr> 66 </tr>
67 {%- endfor %} 67 {%- endfor %}
68 </table> 68 </table>
69 </div> 69 </div>
70 </body> 70 </body>
71 </html> 71 </html>
LEFTRIGHT

Powered by Google App Engine
This is Rietveld