From 174a41e8387b29777274b2c4a0a2ffe5e2f2eab2 Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 16 Nov 2026 13:14:16 +0100 Subject: [PATCH] feat: wireless links in topology, own top-level navigation menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Interfaces with a WirelessLink are now traced like cables; wireless-only connections are drawn blue and dotted with a "Funk" label, also in the location overviews (counted as "1× Funk"). The plugin gets its own "Kunden-Export" menu with icon in the main navigation instead of the Plugins dropdown. Co-Authored-By: Claude Opus 5.5 --- README.md | 7 ++- netbox_customer_export/__init__.py | 2 +- .../locale/de/LC_MESSAGES/django.mo | Bin 22159 -> 22258 bytes .../locale/de/LC_MESSAGES/django.po | 12 +++- netbox_customer_export/navigation.py | 14 ++++- netbox_customer_export/topology.py | 59 +++++++++++++----- pyproject.toml | 2 +- 7 files changed, 71 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index cf9da89..75f2a21 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ All queries respect NetBox permissions (`.restrict(user, "view")`) — a technician only exports what they are allowed to see. Open it via the **Customer Docs** button on site, location, tenant and tenant -group pages, or via **Plugins → Customer Documentation**. Output formats: +group pages, or via **Customer Export → Customer Documentation** in the main navigation. Output formats: **PDF**, **Word** and **HTML preview** (opens in a new tab). ## Compatibility @@ -182,7 +182,7 @@ sudo systemctl restart netbox netbox-rq ### Branding in NetBox (recommended) -Under **Plugins → Branding profiles**, admins create design profiles directly in NetBox: +Under **Customer Export → Branding Profiles**, admins create design profiles directly in NetBox: - name, company name, footer and **logo upload** (PNG/JPG) - colours via colour picker: primary, accent, table header text, labels, zebra stripes @@ -262,10 +262,11 @@ style of Cisco Packet Tracer: - The **cross-site location overview** puts all locations of all sites in scope into **one diagram**; each node shows its site (and parent location), so you can see how buildings and their locations are connected to each other. - Each topology gets its **own landscape page** (PDF and Word) and is scaled as large as possible. - Provider circuits appear as a cloud, devices of other sites dashed (can be disabled). +- **Wireless links** (NetBox *Wireless links*, e.g. point-to-point radio bridges) appear as blue dotted lines labelled "Wireless", in the network view as well as in the location overviews. - Selectable labels: management IP, model, ports on links. - Device names longer than 15 characters are wrapped, preferably at `-`, `_`, `.` or spaces. -**Symbols** (menu **Plugins → Topology symbols**, or the "Topology symbol" +**Symbols** (menu **Customer Export → Topology Symbols**, or the "Topology symbol" button on device type and device role pages): 1. per **device type**: choose a built-in symbol or **upload a custom icon** (PNG/JPG, ideally transparent) diff --git a/netbox_customer_export/__init__.py b/netbox_customer_export/__init__.py index cd8bd5b..4aea9b6 100644 --- a/netbox_customer_export/__init__.py +++ b/netbox_customer_export/__init__.py @@ -6,7 +6,7 @@ class CustomerExportConfig(PluginConfig): name = "netbox_customer_export" verbose_name = _("Customer Export") description = _("Export customer documentation as PDF or Word") - version = "0.18.0" + version = "0.19.0" author = "Claude" base_url = "customer-export" min_version = "4.6.8" diff --git a/netbox_customer_export/locale/de/LC_MESSAGES/django.mo b/netbox_customer_export/locale/de/LC_MESSAGES/django.mo index 24db29e138abc82b9b6288960241b68be1ba64b8..f5959c1b863d1ee63a56a058a694ecbfcea87398 100644 GIT binary patch delta 5883 zcmYM$3vgG(6@c*@$U6iQP(%VGkt8IDgdhS6BJW3dC@%%IR)YbBG}L?0QO~H!PsuilCB1NVsB9igJLm3rRV6fQl^X`lcli%*Wdw0({yZ0tb*CriV zo0QnwI{Cqfe>0Mzr~^*QvKK{5+Wu@Y&3ov##|A9IZRn7r{7A#hGveo4qu0xE01n4I zyb~L7C3eA@c2RUu6eXf%G*Y>+6SMI{Y=H;E_3yDc{r_Q0Ogb})_#fr)!-cz|_j_Un z_QrG^h$T1*PsbZE6Ys*&ct57Fe)JIyAN&MO{xCZ51R8lVX=?!*K!0@nXf)Hwn2R-7 zinpQ*KaDxK4bAvtG|)6AOTjEmW&J4E2DS_4qXCqlnN*;eUVu(G7+rW`xIPmN>^Gr5 zA6wI36#C22iav?X_X4`58!_R9ec{Hz;1N8H>nD-zigGv@t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po b/netbox_customer_export/locale/de/LC_MESSAGES/django.po index 51e8288..67c96d5 100644 --- a/netbox_customer_export/locale/de/LC_MESSAGES/django.po +++ b/netbox_customer_export/locale/de/LC_MESSAGES/django.po @@ -1534,10 +1534,20 @@ msgstr[0] "%(n)d Rack" msgstr[1] "%(n)d Racks" msgid "Cross-site location overview (all locations in one diagram)" -msgstr "Lokationsübersicht standortübergreifend (alle Lokationen in einem Diagramm)" +msgstr "" +"Lokationsübersicht standortübergreifend (alle Lokationen in einem Diagramm)" msgid "Cross-site location overview" msgstr "Standortübergreifende Lokationsübersicht" msgid "All sites" msgstr "Alle Standorte" + +msgid "Wireless" +msgstr "Funk" + +msgid "Export" +msgstr "Export" + +msgid "Settings" +msgstr "Einstellungen" diff --git a/netbox_customer_export/navigation.py b/netbox_customer_export/navigation.py index 1ecb406..b759e81 100644 --- a/netbox_customer_export/navigation.py +++ b/netbox_customer_export/navigation.py @@ -1,7 +1,7 @@ from django.utils.translation import gettext_lazy as _ -from netbox.plugins import PluginMenuButton, PluginMenuItem +from netbox.plugins import PluginMenu, PluginMenuButton, PluginMenuItem -menu_items = ( +_items = ( PluginMenuItem( link="plugins:netbox_customer_export:select", link_text=_("Customer Documentation"), @@ -34,3 +34,13 @@ menu_items = ( ), ), ) + +# Eigener Eintrag im obersten Navigationsmenü statt unter „Plugins“ +menu = PluginMenu( + label=_("Customer Export"), + groups=( + (_("Export"), _items[:1]), + (_("Settings"), _items[1:]), + ), + icon_class="mdi mdi-file-document-multiple-outline", +) diff --git a/netbox_customer_export/topology.py b/netbox_customer_export/topology.py index b337c1a..407c4e2 100644 --- a/netbox_customer_export/topology.py +++ b/netbox_customer_export/topology.py @@ -32,6 +32,7 @@ class Edge: b: str labels: list = field(default_factory=list) summary: str = "" # feste Beschriftung statt Port-Namen (z.B. Lokationsübersicht) + wireless: bool = False # nur Funkstrecken (WirelessLink) – blau gepunktet @dataclass @@ -90,7 +91,7 @@ def build_graphs(scope, opts, per="site"): cache = getattr(scope, "_topology_cache", None) if cache is None: cache = scope._topology_cache = _collect(scope, opts) - by_pk, drawn, links, external = cache + by_pk, drawn, links, external, wireless = cache groups = OrderedDict() for pk in drawn: @@ -130,7 +131,7 @@ def build_graphs(scope, opts, per="site"): kind, icon = drawn[d.pk] other = Node(nid, d.name or str(d), kind, icon, context(d), external=True) nodes[nid] = Node(**{**other.__dict__}) - edges.append(Edge(a, b, labels)) + edges.append(Edge(a, b, labels, wireless=(a, b) in wireless)) if not opts.get("topo_isolated"): linked = {n for e in edges for n in (e.a, e.b)} nodes = OrderedDict((k, v) for k, v in nodes.items() if k in linked) @@ -148,6 +149,7 @@ def build_graphs(scope, opts, per="site"): def _collect(scope, opts): """Geräte, Symbole und Verbindungen (Kabelpfade) des Scopes einmalig einlesen.""" from dcim.models import Interface + from django.db.models import Q resolver = SymbolResolver() devices = list( @@ -162,11 +164,12 @@ def _collect(scope, opts): drawn[d.pk] = (kind, icon) by_pk = {d.pk: d for d in devices} - # Verbindungen: vollständige Kabelpfade (auch über Patchpanels) zwischen Interfaces + # Verbindungen: vollständige Kabelpfade (auch über Patchpanels) und Funkstrecken zwischen Interfaces links = defaultdict(list) # (a, b) -> ["Gi1/0/1 – eth0", …] + kinds = defaultdict(set) # (a, b) -> {"cable", "wireless"} external = {} # node_id -> Node-Vorlage ifaces = scope.restrict( - Interface.objects.filter(device_id__in=list(drawn), cable__isnull=False) + Interface.objects.filter(Q(cable__isnull=False) | Q(wireless_link__isnull=False), device_id__in=list(drawn)) ).select_related("device") for iface in ifaces: try: @@ -207,8 +210,10 @@ def _collect(scope, opts): label = " – ".join(reversed(label.split(" – "))) if label not in links[key]: links[key].append(label) + kinds[key].add("cable" if iface.cable_id else "wireless") - return by_pk, drawn, links, external + wireless = {k for k, v in kinds.items() if v == {"wireless"}} + return by_pk, drawn, links, external, wireless def build_location_graphs(scope, opts, combined=False): @@ -222,6 +227,7 @@ def build_location_graphs(scope, opts, combined=False): Firewall/Router/Core stehen oben, die Ebenen darunter folgen der Verkabelung. """ from dcim.models import FrontPort, Interface, RearPort + from django.db.models import Q resolver = SymbolResolver() devices = list( @@ -244,12 +250,17 @@ def build_location_graphs(scope, opts, combined=False): if d.rack_id: racks[d.location_id].add(d.rack_id) - cables = {} # cable.pk -> (Knoten a, Knoten b, Kabel) + cables = {} # ("c"|"w", pk) -> (Knoten a, Knoten b, Kabel oder WirelessLink) outside = {} # node_id -> Node (andere Standorte / Provider) for model in (Interface, FrontPort, RearPort): - ports = scope.restrict(model.objects.filter(device_id__in=list(by_pk), cable__isnull=False)).select_related("cable") + cond = Q(cable__isnull=False) + if model is Interface: + cond |= Q(wireless_link__isnull=False) + ports = scope.restrict(model.objects.filter(cond, device_id__in=list(by_pk))).select_related("cable") for port in ports: - if port.cable_id in cables: + link = port.cable if port.cable_id else port.wireless_link + link_key = ("c", port.cable_id) if port.cable_id else ("w", port.wireless_link_id) + if link_key in cables: continue try: peers = port.link_peers or [] @@ -277,7 +288,7 @@ def build_location_graphs(scope, opts, combined=False): else: continue if a != b: - cables[port.cable_id] = (a, b, port.cable) + cables[link_key] = (a, b, link) break links = defaultdict(list) @@ -316,7 +327,10 @@ def build_location_graphs(scope, opts, combined=False): loc = all_locs[nid] tpl = Node(nid, loc.name, "location", builtin_icon("location"), [str(loc.site)], external=True) nodes[nid] = Node(**{**tpl.__dict__}) - edges.append(Edge(a, b, [str(c) for c in lst], summary=_cable_summary(lst))) + edges.append(Edge( + a, b, [str(c) for c in lst], summary=_cable_summary(lst), + wireless=all(c._meta.model_name == "wirelesslink" for c in lst), + )) if not opts.get("topo_isolated"): linked = {n for e in edges for n in (e.a, e.b)} nodes = OrderedDict((k, v) for k, v in nodes.items() if k in linked) @@ -328,10 +342,13 @@ def build_location_graphs(scope, opts, combined=False): def _cable_summary(cables): - """„2× SMF, 4× CAT6a“ – Kabel ohne Typ zählen als „Kabel“.""" + """„2× SMF, 4× CAT6a, 1× Funk“ – Kabel ohne Typ zählen als „Kabel“, Funkstrecken als „Funk“.""" types = defaultdict(int) for c in cables: - types[c.get_type_display() if c.type else _("Cable")] += 1 + if c._meta.model_name == "wirelesslink": + types[_("Wireless")] += 1 + else: + types[c.get_type_display() if c.type else _("Cable")] += 1 return ", ".join(f"{n}× {t}" for t, n in sorted(types.items(), key=lambda x: -x[1])) @@ -434,8 +451,12 @@ def _edge_text(graph, e, show_ports): return e.summary if show_ports: labels = _oriented(graph, e) - return labels[0] + (f" (+{len(labels) - 1})" if len(labels) > 1 else "") - return f"{len(e.labels)}×" if len(e.labels) > 1 else None + text = labels[0] + (f" (+{len(labels) - 1})" if len(labels) > 1 else "") + return f"{_('Wireless')}: {text}" if e.wireless else text + count = f"{len(e.labels)}×" if len(e.labels) > 1 else "" + if e.wireless: + return f"{count} {_('Wireless')}".strip() + return count or None # --- PNG ---------------------------------------------------------------------- @@ -445,6 +466,7 @@ PALETTE = [ (23, 150, 170), (140, 86, 75), (188, 150, 20), (200, 80, 160), (90, 90, 90), ] EXTERNAL = (160, 160, 160) +WIRELESS = (30, 136, 229) # Funkstrecken: blau, gepunktet def _font(size, bold=False): @@ -587,7 +609,8 @@ def render_png(graph, show_ports=False, scale=2): line([(min(xs), ly), (max(xs), ly)], col, dashed=u.external) for c, e, ex, stack_pos in entries: dashed = u.external or c.external - line([(ex, ly), (ex, c.y - 2)], EXTERNAL if dashed else col, w=3 if len(e.labels) > 1 else 2, dashed=dashed) + drop_col = WIRELESS if e.wireless else EXTERNAL if dashed else col + line([(ex, ly), (ex, c.y - 2)], drop_col, w=3 if len(e.labels) > 1 else 2, dashed=dashed or e.wireless) if min(xs) < ex < max(xs): # Abzweig auf der Schiene markieren d.ellipse([(ex - 2.5) * S, (ly - 2.5) * S, (ex + 2.5) * S, (ly + 2.5) * S], fill=col) text = _edge_text(graph, e, show_ports) @@ -600,7 +623,8 @@ def render_png(graph, show_ports=False, scale=2): a, b = nodes[e.a], nodes[e.b] ly = gap["top"] + gap["lane_of"][("s", i)] * LANE dashed = a.external or b.external - line([(a.x, a.y - 2), (a.x, ly), (b.x, ly), (b.x, b.y - 2)], EXTERNAL if dashed else (70, 70, 70), dashed=dashed) + col = WIRELESS if e.wireless else EXTERNAL if dashed else (70, 70, 70) + line([(a.x, a.y - 2), (a.x, ly), (b.x, ly), (b.x, b.y - 2)], col, dashed=dashed or e.wireless) text = _edge_text(graph, e, show_ports) if text: labels.append((text, (a.x + b.x) / 2, ly, "mm")) @@ -612,7 +636,8 @@ def render_png(graph, show_ports=False, scale=2): left, right = (a, b) if a.x < b.x else (b, a) line( [(left.x + ICON / 2 + 4, cy), (right.x - ICON / 2 - 4, cy)], - EXTERNAL if dashed else (70, 70, 70), w=3 if len(e.labels) > 1 else 2, dashed=dashed, + WIRELESS if e.wireless else EXTERNAL if dashed else (70, 70, 70), + w=3 if len(e.labels) > 1 else 2, dashed=dashed or e.wireless, ) text = _edge_text(graph, e, show_ports) if text: diff --git a/pyproject.toml b/pyproject.toml index 9345455..23f52d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netbox-customer-export" -version = "0.18.0" +version = "0.19.0" description = "NetBox plugin: customer documentation (PDF/Word) for sites, locations, tenants and tenant groups" readme = "README.md" requires-python = ">=3.10"