Commit Graph
13 Commits
Author SHA1 Message Date
MrBlakeandClaude Opus 5.5 cbb8128385 fix: downscale oversized bulk uploads so NetBox can render thumbnails
NetBox renders image attachment thumbnails under its global 25 MP Pillow
limit, so 50 MP photos uploaded via the bulk form showed no preview.
Scale images above that limit down (applying EXIF orientation) before
saving. Also resolve leftover merge conflict markers in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:19:19 +02:00
MrBlakeandClaude Opus 5.5 a9fd36f31c fix: allow 50 MP smartphone photos in bulk image upload
NetBox sets Pillow's MAX_IMAGE_PIXELS to 25 MP, so Pillow rejects images
above 50 MP as decompression bombs. Raise the limit to 100 MP while the
bulk upload is processed and surface the underlying Pillow error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:14:13 +02:00
MrBlakeandClaude Sonnet 5 bfc4382403 feat: honor images-only/labels-only rack view mode in offline SVG export
The rack elevation page's "Bilder und Beschriftungen" dropdown only
toggles CSS visibility client-side after the browser already has the
SVG, so a freshly server-rendered export had no way to know which mode
was selected and always exported everything.

apply_rack_view_mode() replicates that filtering server-side by
removing the .label text elements (images-only) or the .device-image /
.device-image-label elements (labels-only) from the parsed SVG.
RackElevationOfflineSVGView now accepts a ?view= query param, and the
rack detail page panel syncs its download links to the page's own
"select.rack-view" dropdown so the exported file matches what's
currently shown.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-17 15:30:38 +02:00
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