Remove unused part of template (#4812 example 1)

If there was a connected endpoint to the circuit termination, the interface would have it as its connected endpoint itself
This commit is contained in:
Sander Steffann 2020-07-13 07:40:49 +02:00
parent e02590ac96
commit bf1c0b7b1c

View File

@ -93,33 +93,16 @@
{# Connected to a CircuitTermination #} {# Connected to a CircuitTermination #}
{% with iface.connected_endpoint.get_peer_termination as peer_termination %} {% with iface.connected_endpoint.get_peer_termination as peer_termination %}
{% if peer_termination %} {% if peer_termination %}
{% if peer_termination.connected_endpoint %} <td colspan="2">
<td> <a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">
<a href="{% url 'dcim:device' pk=peer_termination.connected_endpoint.device.pk %}"> {{ peer_termination.site }}
{{ peer_termination.connected_endpoint.device }} </a>
</a><br/> via <i class="fa fa-fw fa-globe" title="Circuit"></i>
<small>via <i class="fa fa-fw fa-globe" title="Circuit"></i> <a href="{{ iface.connected_endpoint.circuit.get_absolute_url }}">
<a href="{{ iface.connected_endpoint.circuit.get_absolute_url }}"> {{ iface.connected_endpoint.circuit.provider }}
{{ iface.connected_endpoint.circuit.provider }} {{ iface.connected_endpoint.circuit }}
{{ iface.connected_endpoint.circuit }} </a>
</a> </td>
</small>
</td>
<td>
{{ peer_termination.connected_endpoint }}
</td>
{% else %}
<td colspan="2">
<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">
{{ peer_termination.site }}
</a>
via <i class="fa fa-fw fa-globe" title="Circuit"></i>
<a href="{{ iface.connected_endpoint.circuit.get_absolute_url }}">
{{ iface.connected_endpoint.circuit.provider }}
{{ iface.connected_endpoint.circuit }}
</a>
</td>
{% endif %}
{% else %} {% else %}
<td colspan="2"> <td colspan="2">
<i class="fa fa-fw fa-globe" title="Circuit"></i> <i class="fa fa-fw fa-globe" title="Circuit"></i>