Commit | Line | Data |
---|---|---|
b6e23181 AC |
1 | <% @header [("title", ["Web usage stats"])] %> |
2 | ||
b13a9a37 | 3 | <b><u>Web virtual host bandwidth</u></b> (bandwidth usage of Apache sites <% case $"last" of "1" => "last month" | "2" => "two months ago" | _ => "this calendar month" %>)<br> |
b6e23181 AC |
4 | <% if $"last" = "1" then %> |
5 | <a href="webbw?last=2">[Previous]</a> | <a href="webbw?last=0">[Current]</a> | |
6 | <% elseif $"last" = "2" then %> | |
7 | <a href="webbw?last=1">[Next]</a> | |
8 | <% else %> | |
9 | <a href="webbw?last=1">[Last month]</a> | |
10 | <% end %> | |
11 | <br><br> | |
12 | ||
b13a9a37 | 13 | <% val stats = iff $"last" = "" then |
b6e23181 AC |
14 | Stats.getWebbw 0 |
15 | else | |
16 | Stats.getWebbw (Web.stoi ($"last")) %> | |
17 | ||
64264243 | 18 | <table class="data"> |
b6e23181 | 19 | <tr><td></td><td><b>Bandwidth (kB)</b></td></tr> |
64264243 | 20 | <tr><td style="text-align: right"><b>Total Apache bandwidth</b></td> <td style="text-align: right"><% #total stats %></td></tr> |
b6e23181 AC |
21 | <tr><td> </td></tr> |
22 | ||
b13a9a37 | 23 | <% foreach dom in #vhosts stats do %> |
64264243 | 24 | <tr><td style="text-align: right"><a href="<% if #ssl (#host dom) then %>https<% else %>http<% end %>://<% #hostname (#host dom) %>/"><% #hostname (#host dom) %><% if #ssl (#host dom) then %> (SSL)<% end %></a> <a href="/webalizer/<% #id (#host dom) %>/">[detail]</a></td><td style="text-align: right"><% #size dom %></td></tr> |
b6e23181 AC |
25 | <% end %> |
26 | ||
27 | </table> | |
28 | ||
29 | <br><br> | |
30 | <b><u>Bandwidth by ownership</u></b> | |
31 | <br><br> | |
32 | ||
33 | <table> | |
34 | <tr><td></td><td></td><td><b>Bandwidth (kB)</b></td></tr> | |
35 | <tr><td> </td></tr> | |
36 | ||
b13a9a37 AC |
37 | <% foreach group in #users stats do %> |
38 | <tr><td align="right"><% #user group %></td><td> | |
39 | <% foreach dom in #hosts group do %> | |
40 | [<a href="/webalizer/<% #id dom %>/"><% #hostname dom %><% if #ssl dom then %> (SSL)<% end %></a> <a href="<% if #ssl dom then %>https<% else %>http<% end %>://<% #hostname dom %>/">(S)</a>] | |
b6e23181 | 41 | <% end %> |
b13a9a37 | 42 | </td><td><% #size group %></td></tr> |
b6e23181 AC |
43 | <% end %> |
44 | ||
45 | </table> | |
46 | ||
64264243 | 47 | </body></html> |