Files
NetBox-Concept/netbox_rack_concept/urls.py
T
MrBlakeandClaude Sonnet 5 777ded3900 Fix elevation overlap, add device images, rack merge, and size override
- 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>
2026-09-16 09:35:18 +02:00

24 lines
964 B
Python

from django.urls import include, path
from utilities.urls import get_model_urls
from . import views
app_name = 'netbox_rack_concept'
urlpatterns = [
# Rack concepts
path('concepts/', include(get_model_urls('netbox_rack_concept', 'rackconcept', detail=False))),
# Combine two concepts into a taller one. Listed before the <int:pk>/ include below only
# for readability; 'merge' can never match the int converter anyway.
path('concepts/merge/', views.MergeConceptsView.as_view(), name='rackconcept_merge'),
path('concepts/<int:pk>/', include(get_model_urls('netbox_rack_concept', 'rackconcept'))),
# Planned devices
path('devices/', include(get_model_urls('netbox_rack_concept', 'conceptdevice', detail=False))),
path('devices/<int:pk>/', include(get_model_urls('netbox_rack_concept', 'conceptdevice'))),
# Entry point from a real rack
path('racks/<int:pk>/copy/', views.RackCopyView.as_view(), name='rack_copy'),
]