{% extends 'dcim/device/base.html' %} {% load render_table from django_tables2 %} {% load buttons %} {% load static %} {% load helpers %} {% load plugins %} {% block head %} {% if use_svg %} {% else %} {% endif %} {% endblock %} {% block content %}
{% spaceless %} {% if use_svg %} {# ── SVG rendering path ── #} {# svg_panels is [(pos, svg_markup)] in ports_chassis order, pre-built in the view #} {% for panel_pos, svg_markup in svg_panels %}

Device {{ panel_pos }}

{% autoescape off %}{{ svg_markup }}{% endautoescape %}
{% endfor %} {% else %} {# ── CSS Grid rendering path (unchanged) ── #} {% for device, interfaces in ports_chassis.items %} Device {{device}}
{% for int in interfaces %} 0 or int.is_port and int.link_peers|length > 0 %} bg-success {% elif int.enabled %} bg-secondary {% else %} bg-danger {% endif %}" data-bs-title="{{ int.name }}{% if int.connected_endpoints|length > 0 %}
{% for ce in int.connected_endpoints %}{{ ce.device }} | {{ ce.name }}{% if not forloop.last %}
{% endif %}{% endfor %}{% elif int.link_peers|length > 0 %}
{% for lp in int.link_peers %}{% if lp.device %}{{ lp.device }} | {{ lp.name }}{% elif lp.circuit %}{{ lp }}{% endif %}{% if not forloop.last %}
{% endif %}{% endfor %}{% endif %}" data-bs-content="
Trace" style="grid-area: {{ int.stylename }}{% if cable_colors == 'on' and int.cable.color != '' %}; background-color: #{{ int.cable.color }}{% endif %}" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="top" data-bs-html="true" data-bs-container="body" data-bs-delay='{"show":200,"hide":300}' data-bs-custom-class="device-view-tooltip" > {% if int.enabled and int.connected_endpoints|length > 0 or int.is_port and int.link_peers|length > 0 %} {% elif int.enabled %} {% else %} {% endif %} {% endfor %}
{% endfor %} {% endif %} {% endspaceless %}
{% if use_svg %} {# ── SVG interactivity script ── #} {% endif %}

Options

{% if not use_svg %} {% endif %} {% endblock %}