Skip to main content

netbox-render

netbox-render

A NetBox plugin I wrote to fix a visibility gap in rack elevations: devices with device bays render as a single opaque block, hiding what's actually installed. This plugin subdivides that block into labeled, color-coded, clickable sections — one per bay.

What it does

Out of the box, NetBox shows a device-bay device as one rectangle with an occupancy count like "3/4". To see what's installed, you have to click into the parent and check the Device Bays tab.

I patched RackElevationSVG._draw_device so each bay gets its own section showing:

  • Bay index (1, 2, 3, ...) sorted by bay name
  • Child device name, or "(empty)"
  • Role color on the front face (rear renders grey, matching stock behavior)
  • Clickable link to the child device page

Devices without bays are untouched.

Before and after

Without plugin With plugin
Stock NetBox elevation With netbox-render
Single opaque block Subdivided with bay labels and role colors

Bay ordering

Bays sort alphabetically by name — there's no numeric position field in NetBox's device bay model. Name them "Slot 01", "Slot 02", etc. for predictable ordering.

Compatibility

NetBox Plugin Status
4.6.x 0.2.0 Tested

Startup checks verify the patched method signature hasn't changed. If it has, the plugin raises a RuntimeError instead of loading.

Installation

pip install netbox-render

Add to configuration.py:

PLUGINS = ['netbox_render']

Restart NetBox:

sudo systemctl restart netbox netbox-rq

For development: pip install -e .

Configuration

PLUGINS_CONFIG = {
    'netbox_render': {
        'enable_images': True,       # default: False
        'layouts': {                  # default: {} (auto-calculate)
            'mac-mini-shelf-2u': {'columns': 3},
            'rpi-cluster-2u': {'columns': 5},
        },
    },
}
Key Default Description
enable_images False Show device type front/rear images in bay sections
layouts {} Per-device-type grid layout overrides (key = device type slug)

Grid layout

Dense shelves (many bays in few rack units) automatically switch to a grid layout when vertical stacking would make bays too short. The column count is auto-calculated to produce the most square cells.

Override with layouts using the device type slug as the key and {'columns': N} as the value. Invalid values (zero, non-integer, exceeding bay count) fall back to auto-calculation with a logged warning.

See the shelf devices guide for detailed examples.

Shelf device guide

See Shelf-devices Guide for a walkthrough on modeling rack shelves using device bays and how this plugin renders them.

Known limitations

  • Bay ordering is name-based, not positional — no way around this without modifying NetBox's data model
  • Images off by default
  • Rear face always renders grey (matches stock NetBox)
  • Both faces show the same bay breakdown
  • No migrations, no DB changes — rendering only
  • Monkeypatch approach: I patch an internal method, so test after every NetBox upgrade

Support

License

Apache-2.0

Metadata

Release files for netbox-render 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-render 0.2.0
File Size Uploaded
netbox_render-0.2.0.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netbox-render 0.2.0
File Interpreter ABI Platform
netbox_render-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / netbox_render-0.2.0.tar.gz

Download URL netbox_render-0.2.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c98ed6950c7cdc757550af87a339460cb2fcf94fc5fbdade74c9474c358a2180
BLAKE2b-256 checksum
How to use checksums
c21123854581f748af5b0d428531907e6e1b6084b6b7ba0bb7d6afb9a521c037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Release files / netbox_render-0.2.0-py3-none-any.whl

Download URL netbox_render-0.2.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4aa5be7ce6fc2d71c8a66e0e75e1012cc619296fc971ad50d24ac55cba9eb90
BLAKE2b-256 checksum
How to use checksums
b1904cd0ebfc4960968f9e0fb3ea54324092ea09d0807b1ab1920ccb73c7fc7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page