Skip to content

v0.12.0 — 10 fixed issues + real PDF backgrounds#68

Merged
DenDanskeMine merged 8 commits into
mainfrom
release/v0.12.0
May 23, 2026
Merged

v0.12.0 — 10 fixed issues + real PDF backgrounds#68
DenDanskeMine merged 8 commits into
mainfrom
release/v0.12.0

Conversation

@DenDanskeMine

Copy link
Copy Markdown
Owner

Summary

Bundles every accepted issue on the v0.12.0 milestone into a single release. All 10 close on merge.

Bug fixes

Features

Polish

  • New About tab in Map Settings — version, license, source/docs/issues links, compatibility matrix.
  • Left-sidebar menu reorganised: Maps, Catalogs, Applications (Beta), Configuration.
  • Floor plan tiles look tighter (gap 2→1, radius 4→2) — less wasted space.
  • Hide patch panels mode now colors virtual edges by real endpoint speed (orange warning on mismatch).
  • "Add connected devices" right-click pulls intermediate patch panels too.

Compatibility

netbox-map NetBox Python
0.12.x 4.5+ · 4.6+ 3.12+

Tested on NetBox 4.5.9 and 4.6.1 side by side.

Migrations

0024 (from #49) — metadata-only related_name on FloorPlan.tags
0025 site_map_load_empty
0026 hidden_tile_types
0027 backfill hidden_tile_types (skips types in use)
0028 hidden_tile_types_sitemap
0029 backfill sitemap list from floor-plan list
0030 CustomMarkerType.icon_foreground
0031 background_image ImageField → FileField (allow PDFs)

All backward-compatible.

New dependency

pypdfium2>=4.0 — Apache-2.0 + BSD, pure-Python wheels, no system packages. Used by the api/pdf-dimensions/ metadata endpoint.

Test plan

  • migrations apply cleanly on existing 0.11.x install
  • PDF backgrounds: upload single-page + multi-page PDFs, verify quality on zoom
  • Hide patch panels with cables routed acc → pp.R → pp.F → srv collapses correctly + speed-color matches
  • netbox-attachments / netbox-contract tabs appear on Application detail (with scope_filter / supported_models configured for netbox_map.*)
  • Multi-site topology: pick 2+ sites → cross-site cables visible
  • Site Map tag filter, Load Empty toggle, Geocode button all work
  • Hide unconnected ports collapses cards; toggle persists in saved view
  • Tile Types tab: separate Floor Plan / Site Map lists work independently
  • Icon picker finds icons beyond the curated set (try rocket, medical, wallet)
  • Icon color Auto correctly picks black vs white based on background luma

Closes #52
Closes #53
Closes #54
Closes #61
Closes #62
Closes #63
Closes #64
Closes #65
Closes #66
Closes #67

#66 Topology "Hide patch panels" toggle now uses the real Front↔Rear
PortMapping (exposed via new passthrough_pairs field on each device node)
instead of a fragile role-slug substring check. Properly chains edges
through patch panels in series and colors the synthetic edges by the
real endpoint port speeds (matching speeds → speed color, mismatch →
orange warning).

#62 netbox-attachments / netbox-contract (and any other plugin that
uses register_model_view to add tabs) now show up on netbox-map detail
pages. Root cause: urls.py used explicit path() entries without
include(get_model_urls(...)), so URLs registered by other plugins were
never wired up. Adding the include() at the top of urlpatterns hooks
them all in.

Bonus: "Add connected devices" right-click now also pulls intermediate
devices on the cable trace (typically patch panels) so cables don't go
missing when the far endpoint is added but the patch panel isn't.

Closes #66
Closes #62
#52 Auto-suggest grid width/height from the chosen background image
dimensions on the FloorPlan add/edit form (pure client-side; reads
naturalWidth/height of the picked file and divides by tile_size,
recomputing live when tile size changes; manual override still works).

#53 Multi-site selection in Topology view — Site filter is now a
multi-select that accepts both repeated ?site_id=… and the comma-
separated form for backwards compatibility with saved views.

#64 Filter Site Map sites by tag — new TagFilterField dropdown on
the Site Map filter form, listing tags actually used on Site.

#65 Site Map: load empty by default — new MapSettings boolean.
Recommended for instances with thousands of sites: starts blank and
only renders sites once a region/group/tenant/tag/device-role filter
is applied.

Closes #52
Closes #53
Closes #64
Closes #65
#61 Toolbar button to hide ports not connected within the current
filtered view. Pure renderer-side filter: each device card collapses
to only show ports whose remote endpoint is also visible. State
persists in saved views.

#54 Geocode unplaced sites from physical_address via Nominatim. New
crosshair-GPS button on each unplaced-site chip in the Site Map editor;
no new server-side dependency — uses the same OpenStreetMap provider
already used for tiles. Handles ambiguous / missing results gracefully.

#63 Three-in-one:
  • Switch and UPS added as built-in tile types
  • New Settings → Tile Types tab with TWO independent lists (Floor
    Plan toolbar vs Site Map create-chip tray). Fresh installs hide
    FTTH/fiber types by default plus floor-plan-structural types
    (column/wall/aisle/empty/reserved) on the Site Map. Existing tiles
    of hidden types still render normally — only the editor chip is
    hidden, so nothing breaks if a type is in use. A small +N hint
    appears next to the chip strip and deep-links into the settings.
  • Icon picker for Custom Marker Types: searches the entire MDI
    catalog (~7000 icons, parsed at runtime from the loaded stylesheet,
    zero new bytes shipped) with a live preview chip and curated
    quick-pick set.
  • Icon color option (Auto / Light / Dark) on Custom Marker Types —
    Auto picks light vs dark from the background luma. Honored
    everywhere: Site Map markers, drag ghosts, sidebar dots, Create
    chips, Floor Plan tiles.

Plus an About tab in Settings with version, license, source/docs/issues
links and a compatibility matrix. Plus a tighter floor-plan tile look
(gap 2→1, radius 4→2). Plus left-sidebar menu reorganised: Maps,
Catalogs, Applications (Beta), Configuration.

Closes #61
Closes #54
Closes #63
CHANGELOG entry summarises every fix/feature in the v0.12.0 milestone:
#52, #53, #54, #60 (via PR #49 from @berlikm), #61, #62, #63, #64, #65, #66.

Compatibility matrix updated: 0.12.x now formally lists NetBox 4.5+ and
4.6+ (tested against 4.5.9 and 4.6.1).
Floor plans now accept PDF uploads alongside PNG / JPEG / GIF / WEBP.
PDFs are stored as-is and rendered to canvas in the browser via PDF.js
at 3x the world resolution, so they stay crisp when the user zooms in
(no blurriness from a pre-rasterized PNG).

  - models: ImageField → FileField on FloorPlan.background_image so
    non-image files can be uploaded
  - forms: clean_background_image() validates the extension only;
    bytes go straight to FileStorage with no server-side processing
  - new endpoint api/pdf-dimensions/ returns the PDF page-1 natural
    pixel dimensions so the grid auto-suggest can fire for PDFs the
    same way it does for raster images (uses pypdfium2 — pure-Python
    wheel, Apache-2.0 + BSD, no system packages)
  - new form field "Auto-fill grid from background" (defaults ON for
    new plans, OFF when editing) so existing grid dims aren't
    silently overwritten on file change
  - frontend: PDF.js (~340KB main + 1.4MB worker) lives under
    static/netbox_map/js/pdfjs/ and is lazy-loaded only when the
    user actually has a PDF background — plans with raster or no
    background pay nothing for the feature
  - floorplan_renderer.loadBackgroundImage() detects .pdf URLs and
    routes them through PDF.js; the rendered offscreen canvas is
    used as bgImg, so the rest of the rendering pipeline doesn't
    change (drawImage works on both canvas and image sources)
  - migration 0031 alters the field type (metadata-only — same
    VARCHAR column underneath, existing rasters keep working
    unchanged)

Closes #67
@DenDanskeMine DenDanskeMine added this to the v0.12.0 milestone May 23, 2026
Run the test job once per NetBox minor line we claim compatibility with
(currently v4.5.10 + v4.6.1). fail-fast: false so a regression on one
version doesn't mask another.
ViewTestCases generate POST data from form_data; the new icon_foreground
field added in this release wasn't in the fixture, so create+edit POSTs
returned the form back (200) instead of redirecting on success (302).
@DenDanskeMine DenDanskeMine merged commit 918300f into main May 23, 2026
3 checks passed
@DenDanskeMine DenDanskeMine deleted the release/v0.12.0 branch May 23, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment