Started work to redo the UI for database changes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-12-21 01:29:59 -05:00
parent 516f125ea7
commit 175ce24b27
6 changed files with 51 additions and 19 deletions

View File

@ -25,7 +25,7 @@
<tbody>
<% hardware.each do |h| %>
<tr>
<td><%= h.name %></td>
<td><a href="/hardware/<%= h.id %>"><%= h.name %></a></td>
<td><%= h.type %></td>
<td><%= date_format(h.created_at) %></td>
<td><%= date_format(h.updated_at) %></td>

20
views/hardware/view.erb Normal file
View File

@ -0,0 +1,20 @@
<div class="grid-x grid-margin-x">
<div class="cell small-12">
<h1><%= hardware.name %></h1>
</div>
</div>
<div class="grix-x grix-margin-x">
<div class="cell small-12">
<%= hardware.type %>
</div>
<div class="cell small-12">
<h4>Tests involving this hardware:</h4>
<ul>
<% hardware.tests().each do |t| %>
<li><a href="/test/<%= t.id %>"><% t.date_tag %></a></li>
<% end %>
</ul>
</div>
</div>

View File

@ -8,16 +8,14 @@
<form class="cell small-12" action="/test/add" method="post">
<div class="grid-x grid-padding-x">
<div class="cell smal-12">
<div class="cell small-12 medium-3">
<label>
Date Tag:
<input type="text" name="test_date_tag" placeholder="(XY/AB)">
</label>
</div>
</div>
<div class="grid-x grid-padding-x">
<div class="cell medium-6">
<div class="cell medium-9">
<label>
Hardware:
<select name="test_hardware">
@ -27,11 +25,13 @@
</select>
</label>
</div>
</div>
<div class="cell medium-6">
<div class="grid-x grid-padding-x">
<div class="cell small-12">
<label>
Benchmark:
<select name="test_benchmark">
<select name="test_benchmark[]" multiple>
<% benchmarks.each do |b| %>
<option value="<%= b.id %>"><%= b.name %></option>
<% end %>

View File

@ -25,7 +25,7 @@
<tbody>
<% tests.each do |t| %>
<tr>
<td><%= t.name %></td>
<td><a href="/test/<%= t.id %>"><%= t.name %></a></td>
<td><%= t.results.length %></td>
<td><%= date_format(t.created_at) %></td>
<td><%= date_format(t.updated_at) %></td>