<div class="row">
  <div class="col-12">
    <h1><%= hardware.name %></h1>
  </div>

  <div class="col-12">
    <p><a href="/hardware/<%= hardware.id %>/edit">Edit</a></p>
  </div>

  <div class="col-12">
    Hardware type: <%= hardware.type %>
  </div>
</div>

<hr>

<div class="row">
  <div class="col-12">
    <h3 class="mb-3">Tests using this benchmark:</h3>

    <% if hardware.tests.length > 0 %>
      <table class="table table-hover table-responsive">
        <thead class="table-light">
          <tr>
            <th>Test title</th>
            <th>Benchmarks</th>
            <th>Last updated</th>
          </tr>
        </thead>
        <tbody>
          <% hardware.tests.each do |t| %>
            <tr>
              <td><a href="/test/<%= t.id %>"><%= t.name %></a></td>
              <td><%= t.benchmarks.length %></td>
              <td><%= t.updated_at %></td>
            </tr>
          <% end %>
        </tbody>
      </table>
    <% else %>
      <p>There are no tests associated with this benchmark.</p>
    <% end %>
  </div>
</div>
