diff --git a/README.md b/README.md index a4570c5..46783a3 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,7 @@ style of Cisco Packet Tracer: - **Scope**: *entire network* (one page per site), *location overview* and/or *per rack* (one page per rack). In the rack view, directly connected devices outside the rack appear faded and dashed, with their rack. - The **location overview** draws one diagram per site with the **locations as nodes** (server room, halls, sub-distributions …). Lines are the physical cables between locations, labelled with count and cable type (e.g. `2× SMF, 4× CAT6a`), so you can follow the cabling from the server room to the last sub-distribution. Locations containing firewalls, routers or core switches are placed at the top; each node shows its parent location and the number of racks and devices. Devices without a location (e.g. radio bridges on the roof) are grouped in a node for their site ("without location"). - 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. -- The **technician version** is meant for third parties (other IT companies, electricians): one diagram per site in which every link is labelled with connection numbers (`#1`, `#2–4`), followed by a table listing **every single connection** with number, device A / port A, cable (label, type, colour, length), patch panels on the way, and device B / port B. +- The **technician version** is meant for third parties (other IT companies, electricians): selectable as *all in one diagram* (across all sites in scope, e.g. for a tenant), *per site* and/or *per location*. In each diagram every link is labelled with connection numbers (`#1`, `#2–4`), followed by a table listing **every single connection** with number, device A / port A, cable (label, type, colour, length), patch panels on the way, and device B / port B. - 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. diff --git a/netbox_customer_export/__init__.py b/netbox_customer_export/__init__.py index da9644b..810fbb2 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.20.0" + version = "0.20.1" author = "Claude" base_url = "customer-export" min_version = "4.6.8" diff --git a/netbox_customer_export/forms.py b/netbox_customer_export/forms.py index 06e7054..fdf930a 100644 --- a/netbox_customer_export/forms.py +++ b/netbox_customer_export/forms.py @@ -89,6 +89,17 @@ class ExportForm(forms.Form): widget=forms.CheckboxSelectMultiple, label=_("Scope"), ) + topo_tech_per = forms.MultipleChoiceField( + choices=( + ("all", _("All in one diagram")), + ("site", _("Per site")), + ("location", _("Per location")), + ), + initial=["all", "site"], + required=False, + widget=forms.CheckboxSelectMultiple, + label=_("Technician version"), + ) topo_external = forms.BooleanField( required=False, initial=True, label=_("Show provider circuits and devices outside the scope") ) diff --git a/netbox_customer_export/locale/de/LC_MESSAGES/django.mo b/netbox_customer_export/locale/de/LC_MESSAGES/django.mo index 9527bdf..8508620 100644 Binary files a/netbox_customer_export/locale/de/LC_MESSAGES/django.mo and b/netbox_customer_export/locale/de/LC_MESSAGES/django.mo differ diff --git a/netbox_customer_export/locale/de/LC_MESSAGES/django.po b/netbox_customer_export/locale/de/LC_MESSAGES/django.po index 678aa35..3930c36 100644 --- a/netbox_customer_export/locale/de/LC_MESSAGES/django.po +++ b/netbox_customer_export/locale/de/LC_MESSAGES/django.po @@ -1584,3 +1584,18 @@ msgstr "Über (Patchpanel)" msgid "Circuit" msgstr "Leitung" + +msgid "All in one diagram" +msgstr "Alles in einem Diagramm" + +msgid "Per site" +msgstr "Je Standort" + +msgid "Per location" +msgstr "Je Lokation" + +msgid "Location %(name)s (%(site)s)" +msgstr "Lokation %(name)s (%(site)s)" + +msgid "Only used if “Technician version” is selected above. Each connection is numbered and listed with exact ports in a table." +msgstr "Nur wirksam, wenn oben „Techniker-Version“ gewählt ist. Jede Verbindung wird nummeriert und mit genauen Ports in einer Tabelle aufgeführt." diff --git a/netbox_customer_export/sections.py b/netbox_customer_export/sections.py index d451f4d..ed9faf3 100644 --- a/netbox_customer_export/sections.py +++ b/netbox_customer_export/sections.py @@ -628,7 +628,11 @@ def topology(scope, opts): if "technician" in scopes: from .topology import number_connections - for i, g in enumerate(build_graphs(scope, opts, per="site")): + graphs = [] + for per in ("all", "site", "location"): + if per in (opts.get("topo_tech_per") or ["all", "site"]): + graphs += build_graphs(scope, opts, per=per) + for i, g in enumerate(graphs): rows = number_connections(g) head = ([H(2, _("Technician version"))] if i == 0 else []) + [H(3, g.title)] tech.append((head, g, rows)) diff --git a/netbox_customer_export/templates/netbox_customer_export/export.html b/netbox_customer_export/templates/netbox_customer_export/export.html index 3bd3979..12d8ebf 100644 --- a/netbox_customer_export/templates/netbox_customer_export/export.html +++ b/netbox_customer_export/templates/netbox_customer_export/export.html @@ -177,6 +177,9 @@