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.

83 lines
3.1KB

  1. <!doctype html>
  2. <html lang="fr">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Guild Wars 2 DPS reports</title>
  6. <link rel="stylesheet" href="assets/css/knacss.css">
  7. <link rel="stylesheet" href="assets/css/index.css">
  8. </head>
  9. <body>
  10. <div class="flex-container">
  11. <div class="w20 pal"></div>
  12. <div class="w50 center pal">
  13. <% BOSSES.walk do |type, path, bosses|
  14. case type
  15. when :node %>
  16. <%= "<h#{path.size} id=\"#{path.join '.'}\">#{I18N.fetch path.last}</h#{path.size}>" %>
  17. <% else
  18. bosses.each do |boss|
  19. reports = @reports[boss]
  20. next unless reports
  21. reports.each do |type, reports|
  22. next if reports.empty? %>
  23. <table>
  24. <thead>
  25. <tr>
  26. <th colspan="2">
  27. <img src="assets/images/bosses/<%= path.first %>/<%= boss %>.png" width="32" />
  28. <%= I18N.fetch boss %><%= ' (CM)' if type == :cm %>
  29. </th>
  30. <td colspan="2">
  31. <% duration = reports.collect { |r| r.fetch :duration }
  32. min, max = duration.minmax
  33. average = duration.sum / duration.length %>
  34. Min : <%= duration_to_s min %><br/>
  35. Moyenne : <%= duration_to_s average %><br/>
  36. Max : <%= duration_to_s max %>
  37. </td>
  38. </tr>
  39. <tr>
  40. <th>Date</th>
  41. <th>Durée</th>
  42. <th>Personnage</th>
  43. <th>DPS</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <% reports.each do |report|
  48. profession = report.fetch(:profession).downcase %>
  49. <tr>
  50. <td>
  51. <a href="<%= path.first %>/<%= report.fetch :filename %>.html">
  52. <%= report.fetch(:date).strftime '%d/%m/%Y %H:%M' %>
  53. </a>
  54. </td>
  55. <td><%= duration_to_s report.fetch :duration %></td>
  56. <td>
  57. <img src="assets/images/professions/<%= profession %>.png" width="24" />
  58. <%= report.fetch :name %></td>
  59. <td>
  60. <% total = report.fetch :total_dps
  61. if total > 0 %>
  62. Total : <%= total %>/s<br/>
  63. Top : <%= top = report.fetch :top_dps %>/s (<%= ((top / total.to_f).round(2)*100).round %>%)<br/>
  64. Personnel : <%= own = report.fetch :own_dps %>/s (<%= ((own / total.to_f).round(2)*100).round %>%)
  65. <% end %>
  66. </td>
  67. </tr>
  68. <% end %>
  69. </tbody>
  70. </table>
  71. <% end
  72. end
  73. end
  74. end %>
  75. </div>
  76. <div class="w20 pal">
  77. </div>
  78. </div>
  79. </body>
  80. </html>