1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Standardize path endpoint templates

This commit is contained in:
Jeremy Stretch
2020-10-05 13:23:55 -04:00
parent 50aecd02f4
commit 32b8148da1
8 changed files with 158 additions and 94 deletions

View File

@@ -77,6 +77,15 @@
</div>
{% if instance.cable %}
<table class="table table-hover panel-body attr-table">
<tr>
<td>Cable</td>
<td>
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
<a href="{% url 'dcim:interface_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</a>
</td>
</tr>
{% if instance.connected_endpoint.device %}
{% with iface=instance.connected_endpoint %}
<tr>
@@ -149,21 +158,12 @@
{% endwith %}
{% endif %}
<tr>
<td>Cable</td>
<td>Path Status</td>
<td>
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
<a href="{% url 'dcim:interface_trace' pk=instance.pk %}" class="btn btn-primary btn-xs" title="Trace">
<i class="fa fa-share-alt" aria-hidden="true"></i>
</a>
</td>
</tr>
<tr>
<td>Connection Status</td>
<td>
{% if instance.connection_status %}
<span class="label label-success">{{ instance.get_connection_status_display }}</span>
{% if instance.path.is_active %}
<span class="label label-success">Reachable</span>
{% else %}
<span class="label label-info">{{ instance.get_connection_status_display }}</span>
<span class="label label-danger">Not Reachable</span>
{% endif %}
</td>
</tr>