<!DOCTYPE html>

{% extends "layout.html.jinja" %}

{%block content %}

<table class="table table-bordered table-striped ">
  <thead>
    <tr>
      <th>#</th>
      <th>{{_('Role')}}</th>
      <th>{{_('Bus')}} / {{_('Address')}}</th>
      <th>{{_('Code')}}</th>
      <th>{{_('Serial Number')}}</th>
      <th>{{_('Manufacturer')}}</th>
      <th>{{_('Product Name')}}</th>
    </tr>
  </thead>

  <tbody>
    {% for device in interface.usb_devices %}
    <tr>
      <td>{{loop.index}}</td>
      <td>
        {% if usb_device_tools.get_device_type(device) %}
            <img
              height="30px"
              src="{{url_for('static', filename='devices/' + usb_device_tools.get_device_type(device) + '.png')}}"/>
        {% endif %}
      </td>
      <td>{{device.bus}} / {{device.address}}</td>
      <td>{{usb_device_tools.get_device_id_vendor_id_product(device)}}</td>
      <td>{{usb_device_tools.get_device_serial_number(device)}}</td>
      <td>{{usb_device_tools.get_device_manufacturer(device)}}</td>
      <td>{{usb_device_tools.get_device_product(device)}}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}
