Commit Graph
10 Commits
Author SHA1 Message Date
MrBlakeandClaude Sonnet 5 ead171d546 fix: inline device images as data URIs in offline SVG export
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>
2026-09-17 15:20:43 +02:00
MrBlakeandClaude Sonnet 5 23acebcf17 fix: handle plain HttpResponse from elevation SVG endpoint, unracked devices
- 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>
2026-09-17 15:16:09 +02:00
MrBlakeandClaude Sonnet 5 3768417be6 feat: add offline SVG export for rack elevations
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>
2026-09-17 14:22:04 +02:00
MrBlake e1153cfce4 fix: validate bulk JPEG uploads only once 2026-08-03 15:46:28 +02:00
MrBlake d54fc646ee feat: add bulk images and tenant autofill 2026-08-03 15:35:44 +02:00
MrBlake 5a2276aec9 fix: replace sidebar controls with resize handle 2026-07-31 11:11:19 +02:00
MrBlake 6b36184f9d feat: add collapsible resizable navigation 2026-07-31 10:25:47 +02:00
MrBlake 8a86ca28f7 feat: add bulk module installation 2026-07-30 16:00:31 +02:00
MrBlake 35e06ee004 feat: add tenant groups and required tenancy 2026-07-28 16:57:52 +02:00
MrBlake 54f6a3f6c9 feat: add personalized navigation and tenant filtering 2026-07-28 16:40:50 +02:00