{% extends 'generic/object.html' %} {% load static %} {% load i18n %} {% load rack_design %} {# Read-only projected elevation of ALL the design's scoped racks, rendered #} {# identically to the editor canvas (every scoped rack side by side, BOTH #} {# Front and Rear faces, full-depth opposite-face hatch and a hover card) but #} {# with NO edit affordances: no catalog/quick-access, no add-rack/design-racks #} {# panels, no drag, no × remove, no favorites, no Save. Static GridStack only. #} {# #} {# Reuses the SAME per-rack block markup as the editor via #} {# inc/rack_block.html (editable=False); the projection comes from the SAME #} {# views._project_rack_bundle helper the editor uses. #} {% block head %} {{ block.super }} {# editor.css supplies the shared multi-rack layout, the full-depth hatch and #} {# the hover-card styling — none of which imply editability. #} {% endblock head %} {% block content %}

{% blocktrans with design=object.title %}Projected elevation: {{ design }}{% endblocktrans %}
{# Chassis elevation: offered on the same has-bays test the editor uses, #} {# and to EVERYONE -- reading what sits in a bay needs no permission. #} {% if has_chassis_in_scope %} {% trans "Chassis" %} {% endif %} {% if perms.netbox_rack_design.change_design %} {% trans "Open editor" %} {% endif %}

{# Read-only root: scopes the static-grid init, the per-rack face toggles #} {# and the hover card (see rack_design.js). #}
{# Legend — also acts as a per-state filter (see legend_filter.js) — and #} {# the power-heatmap toggle, on ONE row: the heatmap is a pure view #} {# layer (docs/power-projection-spec.md §3), so it belongs here just as #} {# much as in the editor. power_heatmap.js needs nothing editable: it #} {# reads each tile's own data-draw-w and, with no editor present, simply #} {# renders the static server distribution without live recompute. #}
{% if rack_blocks %}
{% for b in rack_blocks %} {% include 'netbox_rack_design/inc/rack_block.html' with b=b editable=False %} {% endfor %}
{# /.nbx-rd-racks-scroll #} {% else %}

{% trans "This design has no racks in scope yet." %}

{% endif %}
{% endblock content %} {% block javascript %} {{ block.super }} {# Same toggle as the editor's. It shares the nbxRdPowerHeatmap localStorage #} {# preference, so on/off carries between the elevation and the editor. #} {% endblock javascript %}