Adds a "SVG offline" download button on the rack detail page. It reuses NetBox's own rack-elevation REST endpoint to render the SVG, then strips embedded <a>/xlink:href links (which point at internal, relative NetBox URLs and are useless once the file is saved) so the result renders identically when opened standalone in any SVG viewer. Gated by the new offline_svg_export_enabled plugin setting (on by default). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
20 lines
810 B
Python
20 lines
810 B
Python
from django.urls import path
|
|
|
|
from . import views
|
|
|
|
app_name = "netbox_utilities"
|
|
|
|
urlpatterns = [
|
|
path("images/bulk-upload/", views.BulkImageUploadView.as_view(), name="bulk_image_upload"),
|
|
path("modules/bulk-install/", views.BulkModuleInstallView.as_view(), name="bulk_module_install"),
|
|
path("navigation/", views.NavigationPreferencesView.as_view(), name="navigation_preferences"),
|
|
path("navigation/layout/", views.NavigationLayoutView.as_view(), name="navigation_layout"),
|
|
path(
|
|
"racks/<int:pk>/elevation-svg/",
|
|
views.RackElevationOfflineSVGView.as_view(),
|
|
name="rack_elevation_offline_svg",
|
|
),
|
|
path("settings/", views.UtilitiesSettingsView.as_view(), name="settings"),
|
|
path("tenant/select/", views.SelectTenantView.as_view(), name="select_tenant"),
|
|
]
|