Increase domain component length limit
[hcoop/zz_old/portal.git] / webbw.mlt
CommitLineData
a41f8250 1<% @header [("title", ["Web usage stats"])] %>
2
3<b><u>Web virtual host bandwidth</u></b> (bandwidth usage of Apache sites in this calendar month)<br>
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
13<% val (sum, doms, groups) = iff $"last" = "" then
14 Stats.getWebbw 0
15 else
16 Stats.getWebbw (Web.stoi ($"last")) %>
17
18<table>
19<tr><td></td><td><b>Bandwidth (kB)</b></td></tr>
20<tr><td align="right"><b>Total Apache bandwidth</b></td> <td><% sum %></td></tr>
21<tr><td>&nbsp;</td></tr>
22
23<% foreach (d, n) in doms do %>
24 <tr><td align="right"><a href="<% if #ssl d then %>https<% else %>http<% end %>://<% #hostname d %>/"><% #hostname d %></a> <a href="/webalizer/<% #id d %>/">[detail]</a></td><td><% n %></td></tr>
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>&nbsp;</td></tr>
36
37<% foreach (gr, ds, n) in groups do %>
38 <tr><td align="right"><% gr %></td><td>
39 <% foreach dom in ds do %>
40 [<a href="/webalizer/<% #id dom %>/"><% #hostname dom %></a> <a href="<% if #ssl dom then %>https<% else %>http<% end %>://<% #hostname dom %>/">(S)</a>]
41 <% end %>
42 </td><td><% n %></td></tr>
43<% end %>
44
45</table>
46
47</body></html>