81 lines
2.3 KiB
Twig
81 lines
2.3 KiB
Twig
{% extends 'layout.twig' %}
|
|
|
|
{% block title %}Test: {{ test.title }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="twelve columns">
|
|
<h1>{{ test.title }}</h1>
|
|
<p>{{ test.description }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
<div class="twelve columns">
|
|
<form id="result-form" class="u-full-width" action="{{ url_for('result.add') }}" method="POST">
|
|
<div class="row">
|
|
<div class="four columns">
|
|
<select class="u-full-width" name="result_benchmark">
|
|
{% for b in test.benchmarks %}
|
|
<option value="{{ b.id }}">{{ b.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="two columns">
|
|
<input type="number" step="0.01" name="result_avg" placeholder="0.0">
|
|
</div>
|
|
<div class="two columns">
|
|
<input type="number" step="0.01" name="result_min" placeholder="0.0">
|
|
</div>
|
|
<div class="two columns">
|
|
<input type="number" step="0.01" name="result_max" placeholder="0.0">
|
|
</div>
|
|
|
|
<div class="two columns">
|
|
<button class="button-primary u-full-width" type="submit" name="button">Submit</button>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" name="result_test" value="{{ test.id }}">
|
|
<input type="hidden" name="result_component" value="{{ test.component().id }}">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="row">
|
|
<div class="twelve columns">
|
|
<h3>Benchmark results:</h3>
|
|
|
|
<table class="u-full-width">
|
|
<thead>
|
|
<tr>
|
|
<th>Benchmark</th>
|
|
<th>Scoring</th>
|
|
<th># Results</th>
|
|
<th>Avg.</th>
|
|
<th>Min.</th>
|
|
<th>Max.</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for r in test.benchmarkResults() %}
|
|
<tr>
|
|
<td>{{ r.name }}</td>
|
|
<td>{{ r.scoring | capitalize }}</td>
|
|
<td>{{ r.count }}</td>
|
|
<td>{{ r.average }}</td>
|
|
<td>{{ r.minimum ? r.minimum : 'N/a' }}</td>
|
|
<td>{{ r.maximum ? r.maximum : 'N/a' }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|