[Issue #5] - Reworked app to better organize results with their corresponding tests

This commit is contained in:
2023-09-21 20:41:25 -06:00
parent 269587e6c9
commit c940a248d7
16 changed files with 266 additions and 7 deletions

View File

@ -1,12 +1,43 @@
<div class="grid-x grid-margin-x">
<% if results.length > 0 %>
<% if tests.length > 0 %>
<div class="cell small-12">
<h2>Latest tests:</h2>
</div>
<div class="cell small-12">
<table>
<thead>
<tr>
<th>Hardware tested</th>
<th>Benchmark used</th>
<th># results</th>
</tr>
</thead>
<tbody>
<% tests.each do |t| %>
<tr>
<td><%= t.hardware.name %></td>
<td><%= t.benchmark.name %></td>
<td><%= t.results.length %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="cell small-12">
<p>I'm sorry, there don't appear to be any tests created yet. Check again later!</p>
</div>
<% end %>
<% if results.length > 0 %>
<div class="cell small-12">``
<h2>Latest benchmark results:</h2>
</div>
<div class="cell small-12">
<table>
<thead>
<tr>
<th>Test</th>
<th>Hardware tested</th>
<th>Benchmark used</th>
<th>Score</th>
@ -15,8 +46,9 @@
<tbody>
<% results.each do |r| %>
<tr>
<td><%= r.hardware.name %></td>
<td><%= r.benchmark.name %></td>
<td><%= r.test.name %></td>
<td><%= r.test.hardware.name %></td>
<td><%= r.test.benchmark.name %></td>
<td><%= r.formatted_score() %></td>
</tr>
<% end %>