- 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>
25 lines
1.0 KiB
Python
25 lines
1.0 KiB
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 points from real racks
|
|
path('racks/<int:pk>/copy/', views.RackCopyView.as_view(), name='rack_copy'),
|
|
path('racks/merge/', views.MergeRacksToConceptView.as_view(), name='racks_merge'),
|
|
]
|