{# Checkbox #}
{% if perms.dcim.change_interface or perms.dcim.delete_interface %}
|
{% endif %}
{# Icon and name #}
{{ iface }}
|
{# LAG #}
{% if iface.lag %}
{{ iface.lag }}
{% endif %}
|
{# Description #}
{{ iface.description|default:"—" }} |
{# 802.1Q mode #}
{{ iface.get_mode_display }} |
{# Cable #}
{% with cable=iface.get_connected_cable %}
{% if cable %}
{{ cable }}
{% if cable.far_end != csp.connected_endpoint %}
to {{ cable.far_end.device }} {{ cable.far_end }}
{% endif %}
{% endif %}
{% endwith %}
|
{# Connection or type #}
{% if iface.is_lag %}
LAG interface
{{ iface.member_interfaces.all|join:", "|default:"No members" }}
|
{% elif iface.is_virtual %}
Virtual interface |
{% elif iface.is_wireless %}
Wireless interface |
{% elif iface.connected_endpoint %}
{% with connected_iface=iface.connected_endpoint %}
{{ connected_iface.device }}
|
{{ connected_iface }}
|
{% endwith %}
{% elif iface.circuit_termination %}
{% with iface.circuit_termination.get_peer_termination as peer_termination %}
{% if peer_termination %}
{% if peer_termination.interface %}
{{ peer_termination.interface.device }}
({{ peer_termination.site }})
{% else %}
{{ peer_termination.site }}
{% endif %}
via
{% endif %}
{{ iface.circuit_termination.circuit }}
|
{% endwith %}
{% else %}
Not connected
|
{% endif %}
{# Buttons #}
{% if show_graphs %}
{% if iface.circuit_termination or iface.connection %}
{% endif %}
{% endif %}
{% if perms.ipam.add_ipaddress %}
{% endif %}
{% if perms.dcim.change_interface %}
{% if not iface.is_virtual %}
{% if iface.connection %}
{% if iface.connection.connection_status %}
{% else %}
{% endif %}
{% elif iface.circuit_termination and perms.circuits.change_circuittermination %}
{% else %}
{% endif %}
{% endif %}
{% endif %}
{% if perms.dcim.delete_interface %}
{% if iface.connection or iface.circuit_termination %}
{% else %}
{% endif %}
{% endif %}
|
{% with ipaddresses=iface.ip_addresses.all %}
{% if ipaddresses %}