dcav-stats/dcav-index.erb

49 lines
1.3 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<title>Statistics for dcav.pw</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href=<%="#{RES_BASE}style.css"%>>
<link rel="icon" type="image/png" href="/favicon.png">
</head>
<body>
<h1>Screenshot statistics for dcav.pw</h1>
<h2>Leaderboards</h2>
<table>
<tr>
<th></th>
<th>Name</th>
<th>Count</th>
<th>Size</th>
<th>Average size</th>
<th>Bandwidth</th>
</tr>
<% order = 0
users.sort.each do |user|
order += 1
%>
<%= %Q{
<tr>
<td>#{order}</td>
<td>#{user.name}</td>
<td class=\"right-align\">#{user.count}</td>
<td class=\"right-align\">#{Filesize.from(user.size.to_s + "B").pretty}</td>
<td class=\"right-align\">#{Filesize.from(user.avgsize.to_s + "B").pretty}</td>
<td class=\"right-align\">#{user.bandwidth.to_s}</td>
</tr>}
%>
<% end %>
</table>
<br><i>Bandwidth logged since 2017-05-23</i>
<h2>Charts</h2>
<img src=<%="#{RES_BASE}img/screenshot_count.svg"%> />
<br />
<img src=<%="#{RES_BASE}img/screenshot_size.svg"%> />
<br />
<img src=<%="#{RES_BASE}img/dcavpie.svg"%> />
<br />
<i>Page generated at <%= Time.now %></i>
</body>
</html>