Corrected cable display

This commit is contained in:
Jeremy Stretch 2018-10-29 09:12:41 -04:00
parent 8f8df2b8e8
commit dc67028bd9
4 changed files with 13 additions and 4 deletions

View File

@ -9,7 +9,10 @@
<td>
{% with cable=cp.get_connected_cable %}
{% if cable %}
via <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
Cable <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
{% if cable.far_end != cp.connected_endpoint %}
to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
{% endif %}
{% endif %}
{% endwith %}
</td>

View File

@ -33,7 +33,7 @@
{% with cable=iface.get_connected_cable %}
{% if cable %}
<a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
{% if cable.far_end != csp.connected_endpoint %}
{% if cable.far_end != iface.connected_endpoint %}
to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
{% endif %}
{% endif %}
@ -150,7 +150,7 @@
{% endif %}
{# IP addresses table #}
<td colspan="7" style="padding: 0">
<td colspan="8" style="padding: 0">
<table class="table table-condensed interface-ips">
<thead>
<tr class="text-muted">

View File

@ -17,6 +17,9 @@
{% with cable=po.get_connected_cable %}
{% if cable %}
<a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
{% if cable.far_end != po.connected_endpoint %}
to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
{% endif %}
{% endif %}
{% endwith %}
</td>

View File

@ -9,7 +9,10 @@
<td>
{% with cable=pp.get_connected_cable %}
{% if cable %}
via <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
Cable <a href="{{ cable.get_absolute_url }}">{{ cable }}</a>
{% if cable.far_end != pp.connected_endpoint %}
to <a href="{{ cable.far_end.device.get_absolute_url }}">{{ cable.far_end.device }}</a> {{ cable.far_end }}
{% endif %}
{% endif %}
{% endwith %}
</td>