X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/b6e2318111ec35ec2015ddf17679dd31270d77cb..6aa0cd21ab8b74949d95d375e22dae72a9f35b8c:/webbw.mlt diff --git a/webbw.mlt b/webbw.mlt index 95a8591..272a281 100644 --- a/webbw.mlt +++ b/webbw.mlt @@ -1,6 +1,6 @@ <% @header [("title", ["Web usage stats"])] %> -Web virtual host bandwidth (bandwidth usage of Apache sites in this calendar month)
+Web virtual host bandwidth (bandwidth usage of Apache sites <% case $"last" of "1" => "last month" | "2" => "two months ago" | _ => "this calendar month" %>)
<% if $"last" = "1" then %> [Previous] | [Current] <% elseif $"last" = "2" then %> @@ -10,18 +10,18 @@ <% end %>

-<% val (sum, doms, groups) = iff $"last" = "" then +<% val stats = iff $"last" = "" then Stats.getWebbw 0 else Stats.getWebbw (Web.stoi ($"last")) %> - + -<% foreach (d, n) in doms do %> - +<% foreach dom in #vhosts stats do %> + <% end %>
Bandwidth (kB)
Total Apache bandwidth <% sum %>
Total Apache bandwidth <% #total stats %>
 
<% #hostname d %> [detail]<% n %>
<% #hostname (#host dom) %><% if #ssl (#host dom) then %> (SSL)<% end %> [detail]<% #size dom %>
@@ -34,12 +34,12 @@ Bandwidth (kB)   -<% foreach (gr, ds, n) in groups do %> - <% gr %> - <% foreach dom in ds do %> - [<% #hostname dom %> (S)] +<% foreach group in #users stats do %> + <% #user group %> + <% foreach dom in #hosts group do %> + [<% #hostname dom %><% if #ssl dom then %> (SSL)<% end %> (S)] <% end %> - <% n %> + <% #size group %> <% end %>