Verified against the actually installed versions that the patched
hook signatures (serialize_object, is_exportable_model,
_defer_device_placement, _device_placement_conflicts,
_apply_device_placements, SaveViewSet.update, ReorderView.get) are
still compatible with our wrappers, then added both versions to the
supported sets so the width-aware patches stop being silently
skipped.
netbox-reorder-rack 1.1.5 changed ReorderView.get from
(self, request, pk) to (self, request, **kwargs). Our fallback path
called the original view with a positional pk, which would now raise
TypeError; width_aware_reorder_get now accepts pk as a keyword with
**kwargs passthrough so both the patched and native code paths work
regardless of which signature is installed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
strip_svg_hyperlinks() removed every href, including on <image>
elements that reference device-type photos, leaving devices with
images blank in the exported file. Non-anchor hrefs (currently only
<image>) are now resolved through an optional image_loader callback
and embedded as base64 data URIs instead of being stripped; anchor
unwrapping is unchanged. RackElevationOfflineSVGView wires this up to
NetBox's MEDIA storage.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- RackElevationOfflineSVGView called .render() unconditionally on the
RackViewSet elevation action's response, but that action returns a
plain HttpResponse (not a DRF Response) when render=svg is
requested, causing AttributeError on every click.
- effective_width_positions() crashed with decimal.InvalidOperation
when a device had no rack position set (e.g. surfaced via NetBox
Topology Views, which includes unracked devices). Such devices now
get the default full-width result instead of entering the Decimal
conversion.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The buttons() plugin-template-extension hook was registered for
dcim.rack and rendered without error, but the button HTML never
appeared on the rendered rack detail page in production — NetBox's
Rack detail template apparently doesn't wire the buttons() slot into
its controls row. right_page() is confirmed working for this plugin
already (the device rack-width panel uses it), so the export links
now render there as a small card instead.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Extends the declared version range (min_version stays 4.6.5) and
updates the plugin description to reflect 4.7 support. The plugin's
internal-API monkeypatches (rack elevation SVG, DeviceEditView form)
should be regression-tested against a live NetBox 4.7.1 install, as
those are the areas most likely to break across minor releases.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>