NetBox plugin: DIN rails, subracks, mounting plates, busbars, and multi-row grids with SVG visualization of cabinet interiors, chassis/parent-child devices, and modular PLC chassis. OT/ICS focus.
Project description
netbox-cabinet-view
A NetBox plugin that models physical mounting that doesn't fit a 19″ rack — DIN rails, Eurocard subracks, mounting plates, busbars, and multi-row grids — and renders each cabinet as an SVG drawing inside NetBox itself.
Preview
Every image below is a live SVG served by the plugin's own endpoint, rendered against real seeded demo data on a running NetBox instance. Dark mode follows the parent page automatically.
Rack elevation — with cabinet interiors embedded in place
The plugin patches NetBox's core RackElevationSVG so every carrier-hosting shelf renders its own interior inside its U slot on the rack elevation, on both the front and rear faces:
| Rack front | Rack rear |
|---|---|
The embedded interiors are rendered in thumbnail mode (diminished contrast, no per-placement labels) so they read as "preview — open the Layout tab to interact" rather than pretending each little rectangle is a click target. Full-fidelity rendering is one click away on the device's Layout tab.
A single WDM shelf — DeviceBay-backed child devices
Two filter modules installed into DeviceBay slots on a parent shelf. The plugin resolves placement.device_bay.installed_device at render time, so the picture tracks standard NetBox parent/child device relationships without duplicating any data.
A standalone DIN rail
The simplest case — a bare DIN rail in a Location with two relays clipped on. No enclosing cabinet, no rack, no u_height. Proves the plugin doesn't require an enclosing device hierarchy.
Want to see the rest? The full gallery (20 scenarios covering DIN rails, subracks, mounting plates, busbars, grid mounts, vertical orientations, MCC buckets, VFD cabinets, modular IEDs, ODF frames, …) lives in
docs/scenarios.md.
Compatibility
| NetBox version | Supported | Tested | Notes |
|---|---|---|---|
| 4.5.x | ✅ | ✅ | Actively developed against 4.5.7 — this is the version all screenshots and smoke tests run against |
| 4.4.x | ✅ | ⚠️ | Untested but all APIs used (NetBoxModel, ViewTab, register_model_view, get_model_urls, PluginTemplateExtension.models, HTMXSelect pattern) are present in 4.4.0; no code changes expected |
| 4.3.x and older | ❌ | ❌ | Not supported — some helpers we rely on may not exist or have different signatures |
| 4.6.x (when released) | ❓ | ❓ | To be verified when released |
Python 3.10+ required.
Install
pip install netbox-cabinet-view
Add to your NetBox configuration.py:
PLUGINS = ['netbox_cabinet_view']
Then run migrations and restart NetBox:
python manage.py migrate netbox_cabinet_view
python manage.py collectstatic --no-input
A Cabinet View entry appears in the sidebar, and every dcim.Device detail page whose DeviceType has hosts_mounts=True grows a Layout tab. Unprofiled u_height=0 devices show a soft discovery hint card in the right column pointing users at profile creation.
Using it
- Create a
DeviceMountProfilefor any DeviceType that hosts mounts (sethosts_mounts=Trueand the internal dimensions in mm). Or click the discovery hint card on a cabinet-shaped Device detail page and follow the guided flow. - Create a
DeviceMountProfilefor any DeviceType that mounts on other mounts (setmountable_on,mountable_subtype, andfootprint_primaryin mount units). Placementsizeis optional — it auto-fills from the profile'sfootprint_primary. - Optional: create a
ModuleMountProfilefor anydcim.ModuleTypethat you want rendered at its real width inside a modular chassis. - Create a
Deviceof the host type, place it in a Location or a Rack as normal. - Add one or more
Mountrecords to the host device — DIN rail at offset (x, y) with a length, or a mounting plate with width×height, etc. - Add
Placementrecords to place devices / device bays / module bays on the mounts at specific positions. The form adapts to the selected mount's type: 1D mounts get justposition/size, grid mounts addrow/row_span, 2D mounts switch toposition_x/y+size_x/y. Target dropdowns are compatibility-filtered to valid unoccupied devices and bays. - Visit the host device's detail page → Layout tab.
Faster add-placement shortcut: click any empty slot on the rendered layout. 1D and grid mounts turn every unoccupied slot range into a click target; 2D mounting plates accept click-anywhere coordinates. The placement form opens pre-filled with the mount and position.
Demo data
python manage.py cabinetview_seed
Idempotent. Creates one Site, one Rack, ~30 DeviceTypes with profiles, and 20 demo scenarios covering the common OT/ICS and ISP cabinet patterns. See docs/scenarios.md for the full list of what gets created and what each scenario demonstrates.
Advanced topics
The sections below live in docs/ to keep this README scannable:
docs/architecture.md— the four plugin models (DeviceMountProfile,ModuleMountProfile,Mount,Placement), the Mermaid ER schema, the three-way XOR explainer, and the validation rules enforced inPlacement.clean().docs/scenarios.md— the full 20-scenario demo gallery with tables describing each scenario, plus OT/ICS coverage and ISP-specific notes.docs/certification-ratings.md— why environmental / certification metadata (IP, NEMA, Ex, temperature, SIL, fire, seismic, …) lives in NetBox custom fields instead of plugin models, with a recommended baseline of fields to create ondcim.rackanddcim.devicetype.docs/offline.md— how the plugin is fully offline-safe at runtime (no CDNs, no external fonts, no runtime HTTP calls) for OT/ICS / air-gapped / classified deployments.docs/line-art.md— the bundled library of generic, de-branded front-panel SVGs that ship as ready-to-use placeholder images for modules and host devices.docs/roadmap.md— what's not in v0.4.0 and why (Krone LSA, strut channel, nested SVG recursion, Okabe-Ito palette, drag-to-place UI, …) and what is explicitly NOT on the roadmap (environmental custom fields, standard 19″ patch cabling).
Security & supply chain
Every release ships with machine-readable supply-chain documents under security/:
security/sbom.cdx.json— CycloneDX 1.6 Software Bill of Materials with purl identifiers forgrype/trivy/osv-scanner/ Dependency-Track / GitHub's dependency graph.security/openvex.json— OpenVEX 0.2.0 Vulnerability Exploitability eXchange document. No known CVEs affect the plugin or its sole runtime dependencysvgwrite.
Reporting a vulnerability: please open a private Security Advisory on GitHub rather than a public issue.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netbox_cabinet_view-0.6.0.tar.gz.
File metadata
- Download URL: netbox_cabinet_view-0.6.0.tar.gz
- Upload date:
- Size: 106.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0896fd5eae5c2489e000300498ce0802a86b1220bc55ab24dfb2a41a360ce3a2
|
|
| MD5 |
a94a86036d737cf559fb795efdaa4bab
|
|
| BLAKE2b-256 |
cd65747512ab8ae0bc50f78f6b4283f084485d6f74fc3b8e71d63e11a65aa525
|
File details
Details for the file netbox_cabinet_view-0.6.0-py3-none-any.whl.
File metadata
- Download URL: netbox_cabinet_view-0.6.0-py3-none-any.whl
- Upload date:
- Size: 152.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ad13a62b14e9141c25d3f8d79b7f473c6f14b90f1a483b7f803316140d13f7c
|
|
| MD5 |
b408fe7daef62a11c3dbcb616301599d
|
|
| BLAKE2b-256 |
4e975c71500898280af03a3133c9344670a3a16d9b2fac26f675cf310ef85452
|