Started adding test model/routes/views; removed a bit of the old paradigm with tying results directly to hardware
This commit is contained in:
84
views/test/view.erb
Normal file
84
views/test/view.erb
Normal file
@ -0,0 +1,84 @@
|
||||
<div class="grid-x grid-margin-x">
|
||||
<div class="cell small-12">
|
||||
<h1><%= test.name %></h1>
|
||||
</div>
|
||||
|
||||
<div class="cell small-12">
|
||||
<p><a href="/test/<%= test.id %>/edit">Edit</a></p>
|
||||
</div>
|
||||
|
||||
<div class="cell small-12">
|
||||
Hardware tested: <%= test.hardware.name %>
|
||||
</div>
|
||||
|
||||
<div class="cell small-12">
|
||||
<p><%= test.description %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="grix-x grix-margin-x">
|
||||
<div class="cell small-12">
|
||||
<form class="u-full-width" action="/result/add" method="post">
|
||||
<input type="hidden" name="result_hardware" value="<%= test.id %>">
|
||||
<input type="hidden" name="result_referrer" value="test">
|
||||
|
||||
<div class="grid-x grid-margin-x">
|
||||
<div class="cell medium-5">
|
||||
<label for="result_benchmark">
|
||||
Add benchmark result:
|
||||
<select class="u-full-width" id="result_benchmark" name="result_benchmark">
|
||||
<% test.benchmark.each do |b| %>
|
||||
<option value="<%= b.id %>"><%= b.name %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="cell medium-2">
|
||||
<label for="result_average">
|
||||
Average score:
|
||||
<input type="text" id="result_average" name="result_average" value="">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="cell medium-2">
|
||||
<label for="result_minimum">
|
||||
Minimum score:
|
||||
<input type="text" id="result_minimum" name="result_minimum" value="">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="cell medium-2">
|
||||
<label for="result_maximum">
|
||||
Maximum score:
|
||||
<input type="text" id="result_maximum" name="result_maximum" value="">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="cell medium-1">
|
||||
<input type="submit" class="u-full-width button" value="Submit">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>Benchmark results for this test:</h4>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th>Benchmark name</th>
|
||||
<th>Scoring type</th>
|
||||
<th># results</th>
|
||||
<th>Average</th>
|
||||
<th>Minimum</th>
|
||||
<th>Maximum</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user