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

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

Issue 29934561: #1537 - Remove stats processing from sitescripts (Closed) Base URL: https://hg.adblockplus.org/sitescripts
Patch Set: Created Nov. 2, 2018, 12:42 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
OLDNEW
(Empty)
1 <!--
2 - This file is part of the Adblock Plus web scripts,
3 - Copyright (C) 2006-present eyeo GmbH
4 -
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
7 - published by the Free Software Foundation.
8 -
9 - Adblock Plus is distributed in the hope that it will be useful,
10 - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 - GNU General Public License for more details.
13 -
14 - You should have received a copy of the GNU General Public License
15 - along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 -->
17
18
19 <!DOCTYPE html>
20 <html lang="en">
21 <head>
22 <meta name="robots" content="noindex,nofollow" />
23 <meta charset="utf-8">
24 <link rel="stylesheet" type="text/css" href="../static/stats.css" />
25 <title>Overview for file {{url}}</title>
26 </head>
27
28 <body style="margin-top: 0px">
29 <a name="top">&nbsp;</a>
30 <table class="block" width="100%">
31 <tr>
32 <td class="title" width="250">Overview for file:</td>
33 <td>{{url}}</td>
34 </tr>
35 <tr>
36 <td class="title" width="250">Last update:</td>
37 <td>{{now|formattime}}</td>
38 </tr>
39 </table>
40
41 <div class="block_title">Monthly history</div>
42 <div class="block">
43 <table align="center" style="margin-bottom: 20px;">
44 <tr>
45 <th bgcolor="#ECECEC">Month</th>
46 <th bgcolor="#66DDEE">Hits</th>
47 <th bgcolor="#2EA495">Bandwidth</th>
48 <th>&nbsp;</th>
49 </tr>
50 {%- set data = data|dictsort(true) %}
51 {%- set maxhits = data|maxhits %}
52 {%- set maxbandwidth = data|maxbandwidth %}
53 {%- for name, value in data|reverse %}
54 <tr>
55 <td><a href="{{value.url}}">{{name|monthname}}</a></td>
56 <td align="right">{{value.hits}}</td>
57 <td align="right">{{value.bandwidth|bytes}}</td>
58 <td class="chart">
59 <div class="hitsChart" style="width: {{value.hits|percentage(maxhits )|round(method='ceil')|int}}px;"></div><br />
60 <div class="bandwidthChart" style="width: {{value.bandwidth|percenta ge(maxbandwidth)|round(method='ceil')|int}}px;"></div>
61 </td>
62 </tr>
63 {%- endfor %}
64
65 {%- set totalhits = data|sumhits %}
66 {%- set totalbandwidth = data|sumbandwidth %}
67 <tr class="special">
68 <td class="emph">Total</td>
69 <td align="right">{{totalhits}}</td>
70 <td align="right">{{totalbandwidth|bytes}}</td>
71 <td align="right">&nbsp;</td>
72 </tr>
73 </table>
74 </div>
75 </body>
76 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld