mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Optimized front/rear port connection displays
This commit is contained in:
parent
05431aa83b
commit
17a71d3e26
@ -1,4 +1,3 @@
|
||||
{% with cable=frontport.get_connected_cable %}
|
||||
<tr class="frontport{% if cable %} {% if cable.status %}success{% else %}info{% endif %}{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
@ -22,8 +21,8 @@
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if cable %}
|
||||
<a href="{{ cable.get_absolute_url }}">{{ cable }}</a> to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
|
||||
{% if frontport.cable %}
|
||||
<a href="{{ frontport.cable.get_absolute_url }}">{{ frontport.cable }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Not connected</span>
|
||||
{% endif %}
|
||||
@ -43,4 +42,3 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
|
@ -1,4 +1,3 @@
|
||||
{% with cable=rearport.get_connected_cable %}
|
||||
<tr class="rearport{% if cable %} {% if cable.status %}success{% else %}info{% endif %}{% endif %}">
|
||||
|
||||
{# Checkbox #}
|
||||
@ -21,8 +20,8 @@
|
||||
|
||||
{# Cable #}
|
||||
<td>
|
||||
{% if cable %}
|
||||
<a href="{{ cable.get_absolute_url }}">{{ cable }}</a> to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
|
||||
{% if rearport.cable %}
|
||||
<a href="{{ rearport.cable.get_absolute_url }}">{{ rearport.cable }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Not connected</span>
|
||||
{% endif %}
|
||||
@ -42,4 +41,3 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
|
Loading…
Reference in New Issue
Block a user