feat: optional floor plans from NetBox-FloorPlan
New section 'Raumpläne' renders floor plans of netbox_floorplanner in scope as standalone SVG (Pillow PNG fallback for Word) with room size, background image and placed racks/devices. The plugin is only accessed via the app registry, so there is no hard dependency. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
ca29980aa6
commit
4405a65653
5 files changed
+299
-3
No files matched your search
@@ -315,6 +315,17 @@ def disks(scope, opts):
|
||||
return blocks if len(blocks) > 1 else _empty(opts, blocks)
|
||||
|
||||
|
||||
@section("floorplans", "Raumpläne", "Infrastruktur", default=False, hint="Aus NetBox-FloorPlan (falls installiert)")
|
||||
def floorplans(scope, opts):
|
||||
from . import floorplan
|
||||
|
||||
blocks = [H(1, "Raumpläne")]
|
||||
if not floorplan.is_installed():
|
||||
return _empty(opts, blocks, "Keine Raumpläne erfasst.")
|
||||
blocks += floorplan.floorplan_blocks(scope, opts)
|
||||
return blocks if len(blocks) > 1 else _empty(opts, blocks, "Keine Raumpläne erfasst.")
|
||||
|
||||
|
||||
@section("power", "Stromversorgung", "Infrastruktur", default=False, hint="Power Panels & Feeds")
|
||||
def power(scope, opts):
|
||||
qs = scope.power_feeds().select_related("power_panel", "rack").order_by("power_panel__name", "name")
|
||||
|
||||
Reference in new issue
Block a user