OLD | NEW |
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-2012 Eyeo GmbH | 3 - Copyright (C) 2006-2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 </table> | 44 </table> |
45 <div class="block_title">Subscriptions</div> | 45 <div class="block_title">Subscriptions</div> |
46 <div class="block"> | 46 <div class="block"> |
47 <table align="center"> | 47 <table align="center"> |
48 <tr> | 48 <tr> |
49 <th bgcolor="#ECECEC">Subscription</th> | 49 <th bgcolor="#ECECEC">Subscription</th> |
50 <th bgcolor="#66DDEE">Hits</th> | 50 <th bgcolor="#66DDEE">Hits</th> |
51 <th bgcolor="#2EA495">Bandwidth</th> | 51 <th bgcolor="#2EA495">Bandwidth</th> |
52 <th> </th> | 52 <th> </th> |
53 </tr> | 53 </tr> |
54 {%- set maxHits = subscriptions|max(attribute='hits') %} | 54 {%- set maxHits = subscriptions|max(attribute='hits')|ensuremin(1) %} |
55 {%- set maxBandwidth = subscriptions|max(attribute='bandwidth') %} | 55 {%- set maxBandwidth = subscriptions|max(attribute='bandwidth')|ensuremin(
1) %} |
56 {%- for subscription in subscriptions %} | 56 {%- for subscription in subscriptions %} |
57 <tr> | 57 <tr> |
58 <td><a href="{{subscription.url}}">{{subscription.fileName}}</a></td> | 58 <td><a href="{{subscription.url}}">{{subscription.fileName}}</a></td> |
59 <td align="right">{{subscription.hits}}</td> | 59 <td align="right">{{subscription.hits}}</td> |
60 <td align="right">{{subscription.bandwidth|bytes}}</td> | 60 <td align="right">{{subscription.bandwidth|bytes}}</td> |
61 <td class="chart"> | 61 <td class="chart"> |
62 <div class="hitsChart horizontal" style="width: {{(subscription.hits /
maxHits * 100)|round(method='ceil')|int}}px;"></div><br /> | 62 <div class="hitsChart horizontal" style="width: {{(subscription.hits /
maxHits * 100)|round(method='ceil')|int}}px;"></div><br /> |
63 <div class="bandwidthChart horizontal" style="width: {{(subscription.b
andwidth / maxBandwidth * 100)|round(method='ceil')|int}}px;"></div> | 63 <div class="bandwidthChart horizontal" style="width: {{(subscription.b
andwidth / maxBandwidth * 100)|round(method='ceil')|int}}px;"></div> |
64 </td> | 64 </td> |
65 </tr> | 65 </tr> |
66 {%- endfor %} | 66 {%- endfor %} |
67 </table> | 67 </table> |
68 </div> | 68 </div> |
69 </body> | 69 </body> |
70 </html> | 70 </html> |
OLD | NEW |