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

@@ -44,6 +44,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:consoleport_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 %}
<tr>
<td>Device</td>
@@ -65,26 +74,17 @@
<td>Description</td>
<td>{{ instance.connected_endpoint.description|placeholder }}</td>
</tr>
<tr>
<td>Path Status</td>
<td>
{% if instance.path.is_active %}
<span class="label label-success">Reachable</span>
{% else %}
<span class="label label-danger">Not Reachable</span>
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td>Cable</td>
<td>
<a href="{{ instance.cable.get_absolute_url }}">{{ instance.cable }}</a>
<a href="{% url 'dcim:consoleport_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>
{% else %}
<span class="label label-info">{{ instance.get_connection_status_display }}</span>
{% endif %}
</td>
</tr>
</table>
{% else %}
<div class="panel-body text-muted">