LEFT | RIGHT |
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-2013 Eyeo GmbH | 3 - Copyright (C) 2006-2013 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 {%- macro row(name, value, params, special=False, emph=False, chart=True, fi
ltered_url=None) %} | 69 {%- macro row(name, value, params, special=False, emph=False, chart=True, fi
ltered_url=None) %} |
70 <tr{% if special %} class="special"{% endif%}> | 70 <tr{% if special %} class="special"{% endif%}> |
71 <td{% if emph %} class="emph"{% endif%}> | 71 <td{% if emph %} class="emph"{% endif%}> |
72 {%- if filtered_url %} | 72 {%- if filtered_url %} |
73 <a href="{{filtered_url}}"> | 73 <a href="{{filtered_url}}"> |
74 {%- endif %} | 74 {%- endif %} |
75 | 75 |
76 {%- if not special and params.field.name == "hour" -%} | 76 {%- if not special and params.field.name == "hour" -%} |
77 <div class="hour hour{{name|int % 12 + 1}}"></div> {{name}} | 77 <div class="hour hour{{name|int % 12 + 1}}"></div> {{name}} |
| 78 {%- elif not special and params.field.name == "weekday" -%} |
| 79 {{name|weekday}} |
78 {%- elif not special and params.field.name == "country" -%} | 80 {%- elif not special and params.field.name == "country" -%} |
79 <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> |
80 {%- else -%} | 82 {%- else -%} |
81 {{name}} | 83 {{name}} |
82 {%- endif -%} | 84 {%- endif -%} |
83 | 85 |
84 {%- if filtered_url %} | 86 {%- if filtered_url %} |
85 </a> | 87 </a> |
86 {%- endif %} | 88 {%- endif %} |
87 </td> | 89 </td> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 {%- set count = items|length %} | 155 {%- set count = items|length %} |
154 <div id="{{field.name}}" class="block_title">{{field.title}}</div> | 156 <div id="{{field.name}}" class="block_title">{{field.title}}</div> |
155 <div class="block"> | 157 <div class="block"> |
156 <table align="center"> | 158 <table align="center"> |
157 <tr> | 159 <tr> |
158 <th bgcolor="#ECECEC">{{field.coltitle}}</th> | 160 <th bgcolor="#ECECEC">{{field.coltitle}}</th> |
159 <th bgcolor="#66DDEE" colspan="2">Hits</th> | 161 <th bgcolor="#66DDEE" colspan="2">Hits</th> |
160 <th bgcolor="#2EA495" colspan="2">Bandwidth</th> | 162 <th bgcolor="#2EA495" colspan="2">Bandwidth</th> |
161 </tr> | 163 </tr> |
162 {%- for name, value in items[0:30] %} | 164 {%- for name, value in items[0:30] %} |
163 {{row(name, value, params, special=name|isspecial(field))}} | 165 {{row(name, value, params, special=name|isspecial(field), |
| 166 filtered_url=filtered_urls.get(field.name, {}).get(name, None))}
} |
164 {%- endfor %} | 167 {%- endfor %} |
165 {%- if count > 30 %} | 168 {%- if count > 30 %} |
166 <tr id="{{field.name}}_showAll" class="special"> | 169 <tr id="{{field.name}}_showAll" class="special"> |
167 <td> | 170 <td> |
168 Other | 171 Other |
169 <a href="#" class="showAllLink" data-hide="{{field.name}}_showAl
l" data-show="{{field.name}}_additionalItems"> | 172 <a href="#" class="showAllLink" data-hide="{{field.name}}_showAl
l" data-show="{{field.name}}_additionalItems"> |
170 Show all | 173 Show all |
171 </a> | 174 </a> |
172 </td> | 175 </td> |
173 <td align="right">{{items[30:]|sumhits}}</td> | 176 <td align="right">{{items[30:]|sumhits}}</td> |
174 <td> </td> | 177 <td> </td> |
175 <td align="right">{{items[30:]|sumbandwidth|bytes}}</td> | 178 <td align="right">{{items[30:]|sumbandwidth|bytes}}</td> |
176 <td> </td> | 179 <td> </td> |
177 <td> </td> | 180 <td> </td> |
178 </tr> | 181 </tr> |
179 <tbody id="{{field.name}}_additionalItems" style="display: none;"> | 182 <tbody id="{{field.name}}_additionalItems" style="display: none;"> |
180 {%- for name, value in items[30:] %} | 183 {%- for name, value in items[30:] %} |
181 {{row(name, value, params, special=name|isspecial(field), | 184 {{row(name, value, params, special=name|isspecial(field), |
182 filtered_url=filtered_urls.get(params.field.name, {}).get(name
, None))}} | 185 filtered_url=filtered_urls.get(field.name, {}).get(name, None)
)}} |
183 {%- endfor %} | 186 {%- endfor %} |
184 </tbody> | 187 </tbody> |
185 {%- endif %} | 188 {%- endif %} |
186 {%- if field.showaverage %} | 189 {%- if field.showaverage %} |
187 {%- set avghits = (params.totalhits / count)|int %} | 190 {%- set avghits = (params.totalhits / count)|int %} |
188 {%- set avgbandwidth = (params.totalbandwidth / count)|int %} | 191 {%- set avgbandwidth = (params.totalbandwidth / count)|int %} |
189 {{row("Average", {"hits": avghits, "bandwidth": avgbandwidth}, par
ams, special=True, emph=True)}} | 192 {{row("Average", {"hits": avghits, "bandwidth": avgbandwidth}, par
ams, special=True, emph=True)}} |
190 {%- endif %} | 193 {%- endif %} |
191 {%- if field.name == "day" and filterFields|length == 0 %} | 194 {%- if field.name == "day" and filterFields|length == 0 %} |
192 {{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)}} |
193 {%- endif %} | 196 {%- endif %} |
194 </table> | 197 </table> |
195 </div> | 198 </div> |
196 {%- endif %} | 199 {%- endif %} |
197 {%- endfor %} | 200 {%- endfor %} |
198 </body> | 201 </body> |
199 </html> | 202 </html> |
LEFT | RIGHT |