Added some linkage around the app between tests, benchmarks and hardware

This commit is contained in:
Gregory Ballantine 2025-06-23 18:56:19 -04:00
parent 5394959880
commit ebd5337a6c
4 changed files with 55 additions and 1 deletions

View File

@ -38,7 +38,7 @@ fetchTestBenchmarkResults = (testId, benchmarkId) ->
tableRow = $("#results-table tr[data-benchmark-id=#{benchmarkId}]") tableRow = $("#results-table tr[data-benchmark-id=#{benchmarkId}]")
tableRow.empty() tableRow.empty()
tableRow.append('<td>' + benchmarkData.name + '</td>') tableRow.append('<td><a href="/benchmark/' + benchmarkData.id + '">' + benchmarkData.name + '</a></td>')
tableRow.append('<td>' + benchmarkData.scoring + '</td>') tableRow.append('<td>' + benchmarkData.scoring + '</td>')
tableRow.append('<td>' + resultData.length + '</td>') tableRow.append('<td>' + resultData.length + '</td>')

View File

@ -12,6 +12,31 @@
<hr> <hr>
<h2>Recently Updated Tests Using This Benchmark:</h2>
{% if benchmark.getTests().length > 0 %}
<table class="twelve columns">
<thead>
<tr>
<th>Test Name</th>
<th>Hardware Tested</th>
<th>Last Updated</th>
</tr>
</thead>
<tbody>
{% for t in benchmark.getTests() %}
<tr>
<td><a href="/test/{{ t.id }}">{{ t.title }}</a></td>
<td>{{ t.getHardware().name }}</td>
<td>{{ t.updatedAt | date('m/d/Y g:ia') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>There are no tests registered yet for this hardware.</p>
{% endif %}
<p><a href="/benchmark">Back</a></p> <p><a href="/benchmark">Back</a></p>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -10,6 +10,33 @@
<hr> <hr>
<h2>Recently Updated Tests for This Hardware:</h2>
{% if hardware.getTests().length > 0 %}
<table class="twelve columns">
<thead>
<tr>
<th>Test Name</th>
<th># Benchmarks</th>
<th>Last Updated</th>
</tr>
</thead>
<tbody>
{% for t in hardware.getTests() %}
<tr>
<td><a href="/test/{{ t.id }}">{{ t.title }}</a></td>
<td>{{ t.getBenchmarks().length }}</td>
<td>{{ t.updatedAt | date('m/d/Y g:ia') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>There are no tests registered yet for this hardware.</p>
{% endif %}
</section>
<p><a href="/hardware">Back</a></p> <p><a href="/hardware">Back</a></p>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -5,6 +5,8 @@
{% block content %} {% block content %}
<div class="row"> <div class="row">
<h2>Test: {{ test.title }}</h2> <h2>Test: {{ test.title }}</h2>
<h4>Hardware tested: <a href="/hardware/{{ test.getHardware().id }}">{{ test.getHardware().name }}</a></h4>
</div> </div>
<hr> <hr>