You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

82 lines
3.1 KiB

<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Guild Wars 2 DPS reports</title>
<link rel="stylesheet" href="assets/css/knacss.css">
<link rel="stylesheet" href="assets/css/index.css">
</head>
<body>
<div class="flex-container">
<div class="w20 pal"></div>
<div class="w50 center pal">
<% BOSSES.walk do |type, path, bosses|
case type
when :node %>
<%= "<h#{path.size} id=\"#{path.join '.'}\">#{I18N.fetch path.last}</h#{path.size}>" %>
<% else
bosses.each do |boss|
reports = @reports[boss]
next unless reports
reports.each do |type, reports|
next if reports.empty? %>
<table>
<thead>
<tr>
<th colspan="2">
<img src="assets/images/bosses/<%= path.first %>/<%= boss %>.png" width="32" />
<%= I18N.fetch boss %><%= ' (CM)' if type == :cm %>
</th>
<td colspan="2">
<% duration = reports.collect { |r| r.fetch :duration }
min, max = duration.minmax
average = duration.sum / duration.length %>
Min : <%= duration_to_s min %><br/>
Moyenne : <%= duration_to_s average %><br/>
Max : <%= duration_to_s max %>
</td>
</tr>
<tr>
<th>Date</th>
<th>Durée</th>
<th>Personnage</th>
<th>DPS</th>
</tr>
</thead>
<tbody>
<% reports.each do |report|
profession = report.fetch(:profession).downcase %>
<tr>
<td>
<a href="<%= path.first %>/<%= report.fetch :filename %>.html">
<%= report.fetch(:date).strftime '%d/%m/%Y %H:%M' %>
</a>
</td>
<td><%= duration_to_s report.fetch :duration %></td>
<td>
<img src="assets/images/professions/<%= profession %>.png" width="24" />
<%= report.fetch :name %></td>
<td>
<% total = report.fetch :total_dps
if total > 0 %>
Total : <%= total %>/s<br/>
Top : <%= top = report.fetch :top_dps %>/s (<%= ((top / total.to_f).round(2)*100).round %>%)<br/>
Personnel : <%= own = report.fetch :own_dps %>/s (<%= ((own / total.to_f).round(2)*100).round %>%)
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end
end
end
end %>
</div>
<div class="w20 pal">
</div>
</div>
</body>
</html>