Devices whose role is one of disk_device_roles (default Server, NAS, SAN, MSA) get a "Datenträger" tab with slot layout, disks, RAID groups, warranty and age warnings, replacement history, CSV import, REST API and GraphQL. - First-visit wizard for slot count, rows, first slot number, numbering and form factor; layouts can be saved as device type templates and applied with one click. - Slot grid drawn like the device front, coloured by status, with warning icons; free slots open a pre-filled disk form. - Bulk fill of selected slots with shared attributes and one serial per line (barcode scanner friendly), with live count and duplicate checks. - Sizes in vendor notation (960 GB, 4 TB, 1,92 TB, 2 TiB); the tenant is always taken from the device and follows tenant changes. - RAID groups (RAID 0/1/5/6/10/50/60, RAID-Z1/Z2/Z3, JBOD) with hot spares, usable capacity, tolerated failures and degraded state. - "Ersetzen" marks a disk as removed and opens the successor form; removed disks stay as per-slot history. - Warnings for failed disks, expired or expiring warranties and disks older than disk_age_warning_years. - Global disk list with filters, export, global search by serial, optional device list column, CSV import, REST API and GraphQL. - New settings: disks_enabled, disk_device_roles, disk_age_warning_years, disk_warranty_warning_days. Co-Authored-By: Claude Opus 5.5 <[email protected]>
31 lines
1.7 KiB
Python
31 lines
1.7 KiB
Python
from django.urls import include, path
|
|
from utilities.urls import get_model_urls
|
|
|
|
from . import disk_views, 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"),
|
|
# Datenträger
|
|
path("disks/", include(get_model_urls("netbox_utilities", "disk", detail=False))),
|
|
path("disks/<int:pk>/", include(get_model_urls("netbox_utilities", "disk"))),
|
|
path("disks/<int:pk>/replace/", disk_views.DiskReplaceView.as_view(), name="disk_replace"),
|
|
path("raid-groups/", include(get_model_urls("netbox_utilities", "raidgroup", detail=False))),
|
|
path("raid-groups/<int:pk>/", include(get_model_urls("netbox_utilities", "raidgroup"))),
|
|
path("disk-templates/", include(get_model_urls("netbox_utilities", "diskbaytemplate", detail=False))),
|
|
path("disk-templates/<int:pk>/", include(get_model_urls("netbox_utilities", "diskbaytemplate"))),
|
|
path("devices/<int:pk>/disks/setup/", disk_views.DeviceDiskSetupView.as_view(), name="device_disk_setup"),
|
|
path("devices/<int:pk>/disks/fill/", disk_views.DeviceDiskBulkFillView.as_view(), name="device_disk_fill"),
|
|
]
|