Removed projects; added tests

This commit is contained in:
2023-12-02 23:41:04 -05:00
parent 286219c5ea
commit 75552eccee
16 changed files with 209 additions and 146 deletions

53
views/test/add.twig Normal file
View File

@ -0,0 +1,53 @@
{% extends 'layouts/default.twig' %}
{% block title %}Add a Test{% endblock %}
{% block content %}
<div class="row">
<h2>Add a test</h2>
<form class="twelve columns" action="/test/add" method="POST">
<div class="row">
<div class="three columns">
<label for="test_date_tag">
Test date tag:
<input id="test_date_tag" class="u-full-width" type="text" name="test_date_tag" placeholder="(XX/YY)">
</label>
</div>
<div class="nine columns">
<label for="test_hardware">
Test hardware:
<select id="test_hardware" class="u-full-width" name="test_hardware">
{% for h in hardware %}
<option value="{{ h.id }}">{{ h.name }}</option>
{% endfor %}
</select>
</label>
</div>
</div>
<div class="row">
<div class="twelve columns">
<label for="test_benchmarks">
Test benchmarks:
<select id="test_benchmarks" class="u-full-width" name="test_benchmarks[]" multiple>
{% for b in benchmarks %}
<option value="{{ b.id }}">{{ b.name }}</option>
{% endfor %}
</select>
</label>
</div>
</div>
<div class="row">
<label for="test_description">
Test description:
<textarea id="test_description" class="twelve columns" cols="30" rows="10" name="test_description"></textarea>
</label>
</div>
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
{% endblock %}

29
views/test/list.twig Normal file
View File

@ -0,0 +1,29 @@
{% extends 'layouts/default.twig' %}
{% block title %}List of Tests{% endblock %}
{% block content %}
<div class="row">
<h2>Tests</h2>
<a href="/test/add">Add a test</a>
<table class="twelve columns">
<thead>
<tr>
<td>Date Tag</td>
<td>Created at</td>
<td>Last updated</td>
</tr>
</thead>
<tbody>
{% for t in tests %}
<tr>
<td><a href="/test/{{ t.id }}">{{ t.dateTag }} {{ t.getHardware().name }}</a></td>
<td>{{ t.createdAt | date('m/d/Y g:ia') }}</td>
<td>{{ t.updatedAt | date('m/d/Y g:ia') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

21
views/test/view.twig Normal file
View File

@ -0,0 +1,21 @@
{% extends 'layouts/default.twig' %}
{% block title %}Test: {{ test.getHardware().name }} - {{ test.dateTag }}{% endblock %}
{% block content %}
<div class="row">
<h2>Test: {{ test.getHardware().name }} - {{ test.dateTag }}</h2>
<div class="twelve columns">
<ul>
{% for b in test.getBenchmarks() %}
<li>{{ b.name }}</li>
{% endfor %}
</ul>
</div>
<hr>
<p><a href="/test">Back</a></p>
</div>
{% endblock %}