3
0

devices.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% extends 'base.html' %}
  2. {% block content %}
  3. {% if bt_error %}
  4. <table bgcolor='#d98797'>
  5. <tr>
  6. <td>
  7. {{ bt_error }}
  8. </td>
  9. </tr>
  10. </table>
  11. {% endif %}
  12. <br>
  13. {% if bt_dev %}
  14. <form action='{{url_for('myCar_bluetooth_connect')}}' method='post'>
  15. <table class="pure-table pure-table-horizontal">
  16. <tr>
  17. <th>ID</th><th>Alias</th><th>MAC Address</th><th>RSSI</th><th>connect</th>
  18. </tr>
  19. {% for dev in bt_dev %}
  20. <tr>
  21. <td>{{ loop.index }}</td><td>{{ dev.Alias }}</td><td>{{ dev.Address }}</td><td>{{dev.RSSI}}</td><td>{% if dev.RSSI == None %}
  22. <img src='{{ url_for('static', filename='img/nok.png') }}' width='30px' height='30px'>
  23. {% else %}
  24. <button class="pure-button" formmethod='post' name='bt_dst_mac' value='{{ dev.Address }}'><img src='{{ url_for('static', filename='img/wireless.png') }}' width='30px' height='30px'></button>
  25. {% endif %}</td>
  26. </tr>
  27. {% endfor %}
  28. </table>
  29. </form>
  30. {% else %}
  31. Bluetooth seems to be off
  32. {% endif %}
  33. {% endblock %}