Added back reference associations for result; added table of results to test view

This commit is contained in:
Gregory Ballantine
2024-05-29 11:52:01 -04:00
parent 8df9b7684f
commit 3eca29c2db
5 changed files with 39 additions and 5 deletions

View File

@ -66,7 +66,32 @@
<h4>Latest Benchmark Results:</h4>
<p>There are currently no benchmarks recorded in this test.</p>
{{ $length := len .test.Results }} {{ if eq $length 0 }}
<p>There are currently no benchmarks recorded in this test.</p>
{{ else }}
<table class="u-full-width">
<thead>
<tr>
<th>Hardware</th>
<th>Benchmark</th>
<th>Average</th>
<th>Minimum</th>
<th>Maximum</th>
</tr>
</thead>
<tbody>
{{ range $res := .test.Results }}
<tr>
<td>{{ $res.Hardware.Name }}</td>
<td>{{ $res.Benchmark.Name }}</td>
<td>{{ $res.AverageScore }}</td>
<td>{{ $res.MinimumScore }}</td>
<td>{{ $res.MaximumScore }}</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
<hr>