Updated Test and Result views/routes to use BenchmarkProfile
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful

This commit is contained in:
2026-04-15 13:58:44 -04:00
parent 3dbc11d294
commit d526fa30f4
7 changed files with 17 additions and 13 deletions

View File

@@ -28,8 +28,10 @@
<label for="test_benchmarks">Benchmarks</label>
<select id="test_benchmarks" class="form-select" name="test_benchmarks[]" multiple>
<% for b in benchmarks %>
<option value="<%= b.id %>"><%= b.name %></option>
<% for bp in b.benchmark_profiles %>
<option value="<%= bp.id %>"><%= bp.display_name %></option>
<% end %>
<% end %>
</select>
</div>

View File

@@ -28,8 +28,10 @@
<label for="test_benchmarks">Benchmarks</label>
<select id="test_benchmarks" class="form-select" name="test_benchmarks[]" multiple>
<% for b in benchmarks %>
<option value="<%= b.id %>" <% if test.benchmark?(b.id) %>selected<% end %>><%= b.name %></option>
<% for bp in b.benchmark_profiles %>
<option value="<%= bp.id %>" <% if test.benchmark?(bp.id) %>selected<% end %>><%= bp.display_name %></option>
<% end %>
<% end %>
</select>
</div>

View File

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

View File

@@ -28,8 +28,8 @@
<div class="col-12 col-md-5 mb-3 mb-md-0">
<label for="result_benchmark">Add benchmark result:</label>
<select class="form-select" id="result_benchmark" name="result_benchmark">
<% test.benchmarks.each do |b| %>
<option value="<%= b.id %>"><%= b.name %></option>
<% test.benchmark_profiles.each do |b| %>
<option value="<%= b.id %>"><%= b.display_name %></option>
<% end %>
</select>
</div>
@@ -71,8 +71,8 @@
</tr>
</thead>
<tbody>
<% test.benchmarks.each do |benchmark| %>
<tr data-benchmark-id="<%= benchmark.id %>"></tr>
<% test.benchmark_profiles.each do |bp| %>
<tr data-benchmark-id="<%= bp.id %>"></tr>
<% end %>
</tbody>
</table>