{% extends 'generic/object.html' %} {% load static %} {% load lens %} {% block head %} {{ block.super }} {% include 'netbox_spatial_lens/inc/palette.html' %} {% endblock %} {% comment %} The way up, where NetBox puts it: the map, then the site this floor is in. The floor is the page's title, so it is not said again here. {% endcomment %} {% block breadcrumbs %} {% with site=object.effective_site %} {% if site %} {% endif %} {% endwith %} {% endblock %} {% block content %}
{% include 'netbox_spatial_lens/inc/help.html' with text='Drag a rack to move it. Click a rack to select it, then rotate or remove it, or move it with the arrow keys: one grid step, or one centimetre with Shift. Pick a rack under Not yet placed, then click the floor to put it down. Ctrl + Z undoes and Ctrl + Shift + Z redoes, until Save. Ctrl + wheel zooms; drag the floor to move it when zoomed. To put a background layer to scale, choose Calibrate: drag the layer, pull a corner, or use Set scale. Nothing is written until Save.' %}
{% include 'netbox_spatial_lens/inc/zoom.html' %} {% include 'netbox_spatial_lens/inc/floor_svg.html' with floor=object zoomable=True %}

Not yet placed

{% for rack, width, depth, estimated in unplaced_racks %}
{{ rack.name }} {{ rack.u_height }}U
{% empty %}

Every rack at this site is placed.

{% endfor %}
{% if can_change_layers %} {% comment %} Every layer of the floor, shown or not: a layer switched off is still one to switch on. {% endcomment %}

Background layers

{% for layer in layers %}
{{ layer.name }}
{% empty %}

This floor has no background layer.

{% endfor %}
{% if can_add_layers %} Add a layer {% endif %}
{% endif %}
{% comment %} The editor is handed its ids and endpoints rather than deriving them, so the script stays free of URL construction and works unchanged if the API is mounted elsewhere. {% endcomment %} {% comment %} NetBox sets CSRF_COOKIE_HTTPONLY, so the editor cannot read the token from document.cookie and every write would come back 403. This renders the readable copy it reads instead. {% endcomment %}
{% csrf_token %}
{% endblock %}