index.html 702 B

1234567891011121314151617181920212223242526272829
  1. {% extends "base.html" %}
  2. {% block header_title %}interfaces List{% endblock %}
  3. {% block section_title %}Interfaces List{% endblock %}
  4. {% block content %}
  5. {% if interfaces %}
  6. <table border="1" width="100%">
  7. <tr><th>type</th><th>name</th><th>address</th></tr>
  8. {% for key, value in interfaces.items %}
  9. <tr><td>{{ key }}</td>
  10. {% for ifkey, ifvalue in value.items %}
  11. <td>{% url 'interface:interface-show' key ifkey as url_interface %}
  12. <a href="{{ url_interface }}">{{ ifkey }}</a></td><td>{{ ifvalue.address }}</td>
  13. {% endfor %}
  14. </tr>
  15. {% endfor %}
  16. </table>
  17. {% else %}
  18. <p>No interfaces.</p>
  19. {% endif %}
  20. {% endblock %}