connection_endpoints.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <table class="table table-hover">
  2. <tr>
  3. <th scope="row">Cable</th>
  4. <td>
  5. {{ object.cable|linkify }}
  6. <a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
  7. <i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
  8. </a>
  9. </td>
  10. </tr>
  11. <tr>
  12. <th scope="row">Path Status</th>
  13. <td>
  14. {% if object.path.is_complete and object.path.is_active %}
  15. <span class="badge bg-success">Reachable</span>
  16. {% else %}
  17. <span class="badge bg-danger">Not Reachable</span>
  18. {% endif %}
  19. </td>
  20. </tr>
  21. <tr>
  22. <th scope="row">Path Endpoints</th>
  23. <td>
  24. {% for endpoint in object.connected_endpoints %}
  25. {% if endpoint.parent_object %}
  26. {{ endpoint.parent_object|linkify }}
  27. <i class="mdi mdi-chevron-right"></i>
  28. {% endif %}
  29. {{ endpoint|linkify }}
  30. {% if not forloop.last %}<br />{% endif %}
  31. {% empty %}
  32. {{ ''|placeholder }}
  33. {% endfor %}
  34. </td>
  35. </tr>
  36. </table>