mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Tweaked display of connected circuits
This commit is contained in:
parent
f2f9ff5cbd
commit
6f788fcd23
@ -8,7 +8,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Icon and name #}
|
{# Icon and name #}
|
||||||
<td>
|
<td class="text-nowrap">
|
||||||
<span title="{{ iface.get_form_factor_display }}">
|
<span title="{{ iface.get_form_factor_display }}">
|
||||||
<i class="fa fa-fw fa-{% if iface.mgmt_only %}wrench{% elif iface.is_lag %}align-justify{% elif iface.is_virtual %}circle{% elif iface.is_wireless %}wifi{% else %}exchange{% endif %}"></i>
|
<i class="fa fa-fw fa-{% if iface.mgmt_only %}wrench{% elif iface.is_lag %}align-justify{% elif iface.is_virtual %}circle{% elif iface.is_wireless %}wifi{% else %}exchange{% endif %}"></i>
|
||||||
<a href="{{ iface.get_absolute_url }}">{{ iface }}</a>
|
<a href="{{ iface.get_absolute_url }}">{{ iface }}</a>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<td>{{ iface.get_mode_display|default:"—" }}</td>
|
<td>{{ iface.get_mode_display|default:"—" }}</td>
|
||||||
|
|
||||||
{# Cable #}
|
{# Cable #}
|
||||||
<td>
|
<td class="text-nowrap">
|
||||||
{% if iface.cable %}
|
{% if iface.cable %}
|
||||||
<a href="{{ iface.cable.get_absolute_url }}">{{ iface.cable }}</a>
|
<a href="{{ iface.cable.get_absolute_url }}">{{ iface.cable }}</a>
|
||||||
<a href="{% url 'dcim:interface_trace' pk=iface.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
<a href="{% url 'dcim:interface_trace' pk=iface.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||||
@ -61,19 +61,27 @@
|
|||||||
{% elif iface.connected_endpoint.term_side %}
|
{% elif iface.connected_endpoint.term_side %}
|
||||||
{# 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 %}
|
||||||
<td colspan="2">
|
{% if peer_termination %}
|
||||||
<i class="fa fa-fw fa-globe" title="Circuit"></i>
|
{% if peer_termination.connected_endpoint %}
|
||||||
{% if peer_termination %}
|
<td>
|
||||||
{% if peer_termination.interface %}
|
<a href="{% url 'dcim:device' pk=peer_termination.connected_endpoint.device.pk %}">{{ peer_termination.connected_endpoint.device }}</a><br/>
|
||||||
<a href="{% url 'dcim:device' pk=peer_termination.interface.device.pk %}">{{ peer_termination.interface.device }}</a>
|
<small>via <i class="fa fa-fw fa-globe" title="Circuit"></i> <a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a></small>
|
||||||
(<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>)
|
</td>
|
||||||
{% else %}
|
<td>
|
||||||
|
{{ peer_termination.connected_endpoint }}
|
||||||
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td colspan="2">
|
||||||
<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>
|
<a href="{% url 'dcim:site' slug=peer_termination.site.slug %}">{{ peer_termination.site }}</a>
|
||||||
{% endif %}
|
via <i class="fa fa-fw fa-globe" title="Circuit"></i> <a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a>
|
||||||
via
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a>
|
{% else %}
|
||||||
</td>
|
<td colspan="2">
|
||||||
|
<i class="fa fa-fw fa-globe" title="Circuit"></i>
|
||||||
|
<a href="{% url 'circuits:circuit' pk=iface.connected_endpoint.circuit_id %}">{{ iface.connected_endpoint.circuit }}</a>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
|
Loading…
Reference in New Issue
Block a user