- Extract the elevation's <svg> body into inc/elevation_svg_content.html,
shared by the on-page elevation and a new standalone export template
so they never drift apart.
- Add "Export" dropdown above the elevation: Front/Rear as standalone
SVG (self-contained inline styles, no dependency on the page's CSS,
absolute device-type image URLs so the file still works once saved
elsewhere), Front/Rear as PNG (rasterized entirely client-side via
<canvas> from that same SVG - no new server-side image dependency),
and the whole concept as a draw.io (.drawio / mxGraph XML) diagram
with both faces side by side, reusing the identical block geometry.
- Center the "+ Add device" hint on empty units instead of
right-aligning it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
NetBox sets CSRF_COOKIE_HTTPONLY = True, so document.cookie can never
see the csrftoken cookie - elevation.js's reorder POST always sent an
empty X-CSRFToken header, Django's CSRF middleware rejected every
request with 403 before it reached the view, and the JS's failure
path (removeAttribute('transform') + a small status message) made a
dragged device silently snap back to its old position on every single
attempt, not just occasionally.
Render {% csrf_token %} on the concept detail page and read the token
from that hidden input instead of the cookie - the standard approach
for a plain fetch() POST outside of a form.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Fix "images only" leaving plain labels visible on faces where a
device has no image for that side (e.g. no rear_image set): the
view selector now hides every plain label outright in that mode,
not just the ones an image happens to sit on top of.
- Remove the "Add planned device" button from the elevation card.
Empty units are now click targets themselves - clicking one opens
the add-device form pre-filled with that position and face, exactly
like a real rack's elevation. Occupancy is computed per unit per
face from the existing device blocks.
- Add cabling for concept devices: ConceptComponent (interfaces,
front/rear ports, power ports/outlets, console ports) and
ConceptCable (a connection between two components, restricted to
devices in the same concept). components.sync_components()
populates a device's components from its device type's templates,
including the front/rear port pass-through mapping copied from
DeviceType.port_mappings - so a device with front/rear port
templates (a patch panel being the common case) behaves exactly
like a real one, without hardcoding anything role-specific.
Placeholder devices without a device type get components added by
hand. Full CRUD views, tables, filtersets, API endpoints and a
"Connect" action wired in from the device detail page.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Replace the device-image label background bar and text-shadow with
NetBox's own technique: a black-stroke pass behind a white-fill pass
of the same text, giving crisp readable labels over any image
without a dark box behind them.
- Add an "Images and labels / Images only / Labels only" selector
above the elevation, mirroring the equivalent control on real NetBox
rack elevations. The plain label is always in the markup; the
selector only toggles the image and its over-image label, exactly
like core NetBox does it. Choice persists per browser via
localStorage and works without edit permissions.
- Add a "Merge into concept" button to the real dcim Rack list: select
two racks via the existing bulk-select checkboxes and it forwards
them to the concept-merge page, pre-filled. New
deploy.merge_racks_to_concept() combines two real racks' devices
directly into one new, stacked blueprint without an intermediate
per-rack copy step.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Fix elevation rendering bug: device blocks were drawn MARGIN px
further right than the rack frame/unit slots, causing them to
overlap and extend past the right border. All three now share one
RACK_X origin.
- Show the device type's front/rear image inside each elevation block
(clipped to the block, translucent label bar on top for legibility)
when one is set on the device type; falls back to a plain colour
block with text otherwise.
- Add "Merge" action to combine two concepts into one taller one (e.g.
two half-height racks stacked into a full-height rack): the top
concept's devices are shifted up by the bottom concept's height,
neither source is modified. Available from the plugin menu, from a
concept's detail page, and via POST /concepts/merge/.
- Copying a real rack into a concept can now target a different width,
height and/or starting unit than the source rack; devices that no
longer fit at the chosen size are skipped and reported as warnings
instead of aborting the copy.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Introduces a NetBox 4.6 plugin for planning rack layouts (RackConcept,
ConceptDevice) without creating real dcim.Rack/dcim.Device objects, so
blueprints never appear in rack/device lists, utilization reports, or
IPAM.
Features:
- Copy paths: real rack -> concept, concept -> concept (clone), and
concept -> one or more real racks (deploy, with name patterning and
dry-run support)
- Manual concept creation via a dedicated "Rack Concepts" nav menu
- Tenant and tenant group assignment on concepts and planned devices
- Partial-width device placement (1/1-1/4) with slot-based collision
detection, matching netbox_utilities' partial-width feature
- Custom drag-and-drop elevation (netbox-reorder-rack operates on real
Device querysets, which concepts don't have) with server-side
validation of every move
- Full REST API, filtering, CSV import, bulk edit, search integration
- Optional, config-driven interop with netbox_utilities (partial-width
field mapping) and netbox-reorder-rack, degrading gracefully when
either plugin is absent
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>