100 lines
2.7 KiB
Cheetah
100 lines
2.7 KiB
Cheetah
{{ template "header" . }}
|
|
|
|
<div class="row">
|
|
<h2>{{ .test.Name }}</h2>
|
|
|
|
<p><a href="/hardware/{{ .test.Hardware.ID }}">link to hardware tested.</a></p>
|
|
|
|
<p>{{ .test.Description }}</p>
|
|
|
|
<h4>Benchmarks used:</h4>
|
|
|
|
<ul>
|
|
{{ range $bm := .test.Benchmarks }}
|
|
<li><a href="/benchmark/{{ $bm.ID }}">{{ $bm.Name }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
<hr>
|
|
|
|
<h4>Add new result:</h4>
|
|
|
|
<form class="u-full-width" action="/result/add" method="POST">
|
|
<div class="row">
|
|
<div class="columns four">
|
|
<label for="result_benchmark">
|
|
Benchmark:
|
|
<select id="result_benchmark" class="u-full-width" name="result_benchmark">
|
|
{{ range $bm := .test.Benchmarks }}
|
|
<option value="{{ $bm.ID }}">{{ $bm.Name }}</option>
|
|
{{ end }}
|
|
</select>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="columns two">
|
|
<label for="result_avg">
|
|
Average score:
|
|
<input id="result_avg" class="u-full-width" type="number" name="result_avg" value="0">
|
|
</label>
|
|
</div>
|
|
|
|
<div class="columns two">
|
|
<label for="result_min">
|
|
Minimum score:
|
|
<input id="result_min" class="u-full-width" type="number" name="result_min" value="0">
|
|
</label>
|
|
</div>
|
|
|
|
<div class="columns two">
|
|
<label for="result_max">
|
|
Maximum score:
|
|
<input id="result_max" class="u-full-width" type="number" name="result_max" value="0">
|
|
</label>
|
|
</div>
|
|
|
|
<div class="columns two">
|
|
<button class="button-primary u-full-width" type="submit" name="button">Submit</button>
|
|
</div>
|
|
|
|
<input type="hidden" name="result_test" value="{{ .test.ID }}">
|
|
<input type="hidden" name="result_hardware" value="{{ .test.Hardware.ID }}">
|
|
</div>
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<h4>Latest Benchmark Results:</h4>
|
|
|
|
{{ $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 card-1">
|
|
<thead>
|
|
<tr>
|
|
<th>Benchmark</th>
|
|
<th>Average</th>
|
|
<th>Minimum</th>
|
|
<th>Maximum</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range $res := .test.Results }}
|
|
<tr>
|
|
<td>{{ $res.Benchmark.Name }}</td>
|
|
<td>{{ $res.AverageScore }}</td>
|
|
<td>{{ if eq $res.MinimumScore 0.0 }}N/a{{ else }}{{ $res.MinimumScore }}{{ end }}</td>
|
|
<td>{{ if eq $res.MaximumScore 0.0 }}N/a{{ else }}{{ $res.MaximumScore }}{{ end }}</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
{{ end }}
|
|
|
|
<hr>
|
|
|
|
<p><a href="/test">Back</a></p>
|
|
</div>
|
|
|
|
{{ template "footer" . }}
|