unifi-network-maps 1.4.2__tar.gz → 1.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/CHANGELOG.md +14 -9
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/PKG-INFO +1 -1
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/pyproject.toml +1 -1
- unifi_network_maps-1.4.4/src/unifi_network_maps/__init__.py +1 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/themes/dark.yaml +3 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/cli/main.py +11 -6
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/mermaid.py +10 -1
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/mermaid_theme.py +15 -5
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/theme.py +19 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/PKG-INFO +1 -1
- unifi_network_maps-1.4.2/src/unifi_network_maps/__init__.py +0 -1
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/CONTRIBUTING.md +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/LICENSE +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/LICENSES.md +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/MANIFEST.in +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/README.md +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/RELEASING.md +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/SECURITY.md +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/setup.cfg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/__main__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/adapters/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/adapters/config.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/adapters/unifi.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/access-point.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/ISOPACKS_LICENSE +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/block.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/cache.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/cardterminal.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/cloud.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/cronjob.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/cube.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/desktop.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/diamond.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/dns.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/document.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/firewall.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/function-module.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/image.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/laptop.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/loadbalancer.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/lock.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/mail.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/mailmultiple.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/mobiledevice.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/office.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/package-module.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/paymentcard.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/plane.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/printer.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/pyramid.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/queue.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/router.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/server.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/speech.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/sphere.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/storage.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/switch-module.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/tower.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/truck-2.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/truck.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/user.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/isometric/vm.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/laptop.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/router-network.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/server-network.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/server.svg +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/themes/default.yaml +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/cli/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/cli/__main__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/debug.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/export.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/mock_data.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/mock_generate.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/labels.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/lldp.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/ports.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/topology.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/__init__.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/device_ports_md.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/lldp_md.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/svg.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/svg_theme.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/SOURCES.txt +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/dependency_links.txt +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/entry_points.txt +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/requires.txt +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/top_level.txt +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_cli.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_clients.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_config.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_contract_unifi.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_contract_unifi_live.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_debug.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_device_ports_md.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_export.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_groups.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_labels.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_lldp.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_lldp_md.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_mermaid.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_mock_generate.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_svg.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_svg_iso.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_theme.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_topology.py +0 -0
- {unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/tests/test_unifi.py +0 -0
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## v1.4.
|
|
5
|
+
## v1.4.4 - (2026-01-10)
|
|
6
|
+
- Improved dark theme Mermaid readability (labels + link borders).
|
|
7
|
+
- Fixed MkDocs sidebar legend duplication with dual-theme output.
|
|
8
|
+
- Added smoke tests for dual-theme MkDocs sidebar legend output.
|
|
9
|
+
|
|
10
|
+
## v1.4.2 - 2026-01-10
|
|
6
11
|
- Added static code analysis and stricter type-checking
|
|
7
12
|
- Added contract tests for UniFi API wrapper with fixture-based validation.
|
|
8
13
|
- Added optional live UniFi contract tests (gated by `UNIFI_CONTRACT_LIVE=1`).
|
|
@@ -19,10 +24,10 @@ All notable changes to this project will be documented in this file.
|
|
|
19
24
|
- Added optional UniFi API request timeouts via `UNIFI_REQUEST_TIMEOUT_SECONDS`.
|
|
20
25
|
- Made `--output` writes atomic to avoid partial files on interruption.
|
|
21
26
|
|
|
22
|
-
## v1.4.1
|
|
27
|
+
## v1.4.1 - 2026-01-06
|
|
23
28
|
- pip install was broken, fixed.
|
|
24
29
|
|
|
25
|
-
## v1.4.0
|
|
30
|
+
## v1.4.0 - 2026-01-06
|
|
26
31
|
- Added MkDocs output, which includes gateway/switch details and per-port tables.
|
|
27
32
|
- Port tables show speed, PoE status, power, and wired clients per port.
|
|
28
33
|
- Added compact legend with sidebar injection (`--mkdocs-sidebar-legend`).
|
|
@@ -35,14 +40,14 @@ All notable changes to this project will be documented in this file.
|
|
|
35
40
|
- Added Faker-powered `--generate-mock` for deterministic mock fixtures (dev-only).
|
|
36
41
|
- Added mock fixtures + SVG/Mermaid examples, with mock smoketest/CI steps.
|
|
37
42
|
|
|
38
|
-
## v1.3.1
|
|
43
|
+
## v1.3.1 - 2026-01-04
|
|
39
44
|
- Added `lldp-md` output with per-device details tables and optional client sections.
|
|
40
45
|
- Added `--client-scope wired|wireless|all` and dashed wireless client links in Mermaid/SVG.
|
|
41
46
|
- Expanded smoketest outputs for wireless/all client scopes and LLDP markdown.
|
|
42
47
|
- Fixed SVG icon loading paths after package reorg.
|
|
43
48
|
- Tuned isometric port label placement on front tiles.
|
|
44
49
|
|
|
45
|
-
## v1.3.0
|
|
50
|
+
## v1.3.0 - 2026-01-04
|
|
46
51
|
- Reorganized package into submodules (`adapters/`, `model/`, `render/`, `io/`, `cli/`).
|
|
47
52
|
- YAML-based theming with default + dark themes and `--theme-file`.
|
|
48
53
|
- CLI help now grouped by category; CLI logic split into focused helpers.
|
|
@@ -51,13 +56,13 @@ All notable changes to this project will be documented in this file.
|
|
|
51
56
|
- Added PoE/edge/device count logging and improved label ordering helpers.
|
|
52
57
|
- Coverage excludes asset packages; docs updated (options/groups + AI disclosure).
|
|
53
58
|
|
|
54
|
-
## v1.2.4
|
|
59
|
+
## v1.2.4 - 2026-01-03
|
|
55
60
|
- Added typed `UplinkInfo`/`PortInfo` and uplink fallback for LLDP gaps.
|
|
56
61
|
- Deterministic edge ordering for repeatable output.
|
|
57
62
|
- CI publish workflow (trusted publishing) and release docs.
|
|
58
63
|
- Project metadata and packaging updated for OSS readiness.
|
|
59
64
|
|
|
60
|
-
## v1.1.0
|
|
65
|
+
## v1.1.0 - 2026-01-03
|
|
61
66
|
- Added isometric SVG output with grid-aligned links and isometric icon set.
|
|
62
67
|
- Improved port label placement and client labeling in SVG outputs.
|
|
63
68
|
- Added smoketest target with multiple outputs (ports/clients/legend).
|
|
@@ -65,14 +70,14 @@ All notable changes to this project will be documented in this file.
|
|
|
65
70
|
- Fixed Mermaid legend/grouped output parsing errors.
|
|
66
71
|
- Refined visuals: link gradients, tile gradients, icon placement tweaks.
|
|
67
72
|
|
|
68
|
-
## v1.0.0
|
|
73
|
+
## v1.0.0 - 2025-12-30
|
|
69
74
|
- Mermaid legend can render as a separate graph.
|
|
70
75
|
- Straight Mermaid links with node type coloring.
|
|
71
76
|
- Added wired client leaf nodes and uplink port labels.
|
|
72
77
|
- Expanded PoE detection tests and LLDP helpers.
|
|
73
78
|
- CLI loads `.env` automatically.
|
|
74
79
|
|
|
75
|
-
## v0.2.0
|
|
80
|
+
## v0.2.0 - 2026-01-02 - Initial public release
|
|
76
81
|
- Added versioning workflow and bump tooling.
|
|
77
82
|
- Introduced SVG renderer and tree layout fixes.
|
|
78
83
|
- Increased test coverage and added coverage tooling.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.4.4"
|
|
@@ -507,9 +507,9 @@ def _write_mkdocs_sidebar_assets(output_path: str) -> None:
|
|
|
507
507
|
(assets_dir / "legend.js").write_text(
|
|
508
508
|
(
|
|
509
509
|
'document.addEventListener("DOMContentLoaded", () => {\n'
|
|
510
|
-
' const
|
|
510
|
+
' const legends = document.querySelectorAll("[data-unifi-legend]");\n'
|
|
511
511
|
' const sidebar = document.querySelector(".md-sidebar--secondary .md-sidebar__scrollwrap");\n'
|
|
512
|
-
" if (!
|
|
512
|
+
" if (!legends.length || !sidebar) {\n"
|
|
513
513
|
" return;\n"
|
|
514
514
|
" }\n"
|
|
515
515
|
' const wrapper = document.createElement("div");\n'
|
|
@@ -518,17 +518,22 @@ def _write_mkdocs_sidebar_assets(output_path: str) -> None:
|
|
|
518
518
|
' title.className = "unifi-legend-title";\n'
|
|
519
519
|
' title.textContent = "Legend";\n'
|
|
520
520
|
" wrapper.appendChild(title);\n"
|
|
521
|
-
"
|
|
521
|
+
" legends.forEach((legend) => {\n"
|
|
522
|
+
" wrapper.appendChild(legend.cloneNode(true));\n"
|
|
523
|
+
' legend.classList.add("unifi-legend-hidden");\n'
|
|
524
|
+
" });\n"
|
|
522
525
|
" sidebar.appendChild(wrapper);\n"
|
|
523
|
-
' legend.classList.add("unifi-legend-hidden");\n'
|
|
524
526
|
"});\n"
|
|
525
527
|
),
|
|
526
528
|
encoding="utf-8",
|
|
527
529
|
)
|
|
528
530
|
(assets_dir / "legend.css").write_text(
|
|
529
531
|
(
|
|
530
|
-
".unifi-legend-hidden
|
|
531
|
-
"
|
|
532
|
+
".unifi-legend-hidden,\n"
|
|
533
|
+
".unifi-legend-hidden.unifi-legend,\n"
|
|
534
|
+
".unifi-legend-hidden.unifi-legend--light,\n"
|
|
535
|
+
".unifi-legend-hidden.unifi-legend--dark {\n"
|
|
536
|
+
" display: none !important;\n"
|
|
532
537
|
"}\n\n"
|
|
533
538
|
".unifi-legend-sidebar {\n"
|
|
534
539
|
" margin-top: 1rem;\n"
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/mermaid.py
RENAMED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import json
|
|
5
6
|
from collections.abc import Iterable
|
|
6
7
|
|
|
7
8
|
from ..model.topology import Edge
|
|
@@ -163,7 +164,15 @@ def render_mermaid(
|
|
|
163
164
|
) -> str:
|
|
164
165
|
edge_list = list(edges)
|
|
165
166
|
id_map = _build_id_map(edge_list, _group_nodes(groups))
|
|
166
|
-
|
|
167
|
+
theme_vars: dict[str, object] = {}
|
|
168
|
+
if theme.edge_label_border:
|
|
169
|
+
theme_vars["edgeLabelBorderColor"] = theme.edge_label_border
|
|
170
|
+
if theme.edge_label_border_width:
|
|
171
|
+
theme_vars["edgeLabelBorderWidth"] = theme.edge_label_border_width
|
|
172
|
+
lines = []
|
|
173
|
+
if theme_vars:
|
|
174
|
+
lines.append(f'%%{{init: {{"themeVariables": {json.dumps(theme_vars)}}}}}%%')
|
|
175
|
+
lines.append(f"graph {direction}")
|
|
167
176
|
if groups:
|
|
168
177
|
_render_group_sections(lines, groups, group_order=group_order, id_map=id_map)
|
|
169
178
|
use_node_labels = not groups
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/mermaid_theme.py
RENAMED
|
@@ -18,6 +18,9 @@ class MermaidTheme:
|
|
|
18
18
|
standard_link: str
|
|
19
19
|
standard_link_width: int
|
|
20
20
|
standard_link_arrow: str
|
|
21
|
+
node_text: str | None = None
|
|
22
|
+
edge_label_border: str | None = None
|
|
23
|
+
edge_label_border_width: int | None = None
|
|
21
24
|
|
|
22
25
|
|
|
23
26
|
DEFAULT_THEME = MermaidTheme(
|
|
@@ -32,15 +35,22 @@ DEFAULT_THEME = MermaidTheme(
|
|
|
32
35
|
standard_link="#2ecc71",
|
|
33
36
|
standard_link_width=2,
|
|
34
37
|
standard_link_arrow="none",
|
|
38
|
+
node_text=None,
|
|
39
|
+
edge_label_border=None,
|
|
40
|
+
edge_label_border_width=None,
|
|
35
41
|
)
|
|
36
42
|
|
|
37
43
|
|
|
38
44
|
def class_defs(theme: MermaidTheme = DEFAULT_THEME) -> list[str]:
|
|
45
|
+
def node_def(name: str, fill: str, stroke: str) -> str:
|
|
46
|
+
color = f",color:{theme.node_text}" if theme.node_text else ""
|
|
47
|
+
return f" classDef {name} fill:{fill},stroke:{stroke},stroke-width:1px{color};"
|
|
48
|
+
|
|
39
49
|
return [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
node_def("node_gateway", theme.node_gateway[0], theme.node_gateway[1]),
|
|
51
|
+
node_def("node_switch", theme.node_switch[0], theme.node_switch[1]),
|
|
52
|
+
node_def("node_ap", theme.node_ap[0], theme.node_ap[1]),
|
|
53
|
+
node_def("node_client", theme.node_client[0], theme.node_client[1]),
|
|
54
|
+
node_def("node_other", theme.node_other[0], theme.node_other[1]),
|
|
45
55
|
" classDef node_legend font-size:10px;",
|
|
46
56
|
]
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/theme.py
RENAMED
|
@@ -29,6 +29,18 @@ def _coerce_color(value: object, default: str) -> str:
|
|
|
29
29
|
return value if isinstance(value, str) else default
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
def _coerce_optional_color(value: object, default: str | None) -> str | None:
|
|
33
|
+
return value if isinstance(value, str) else default
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _coerce_optional_int(value: object, default: int | None) -> int | None:
|
|
37
|
+
if isinstance(value, int):
|
|
38
|
+
return value
|
|
39
|
+
if isinstance(value, float):
|
|
40
|
+
return int(value)
|
|
41
|
+
return default
|
|
42
|
+
|
|
43
|
+
|
|
32
44
|
def _mermaid_theme_from_dict(data: dict, base: MermaidTheme) -> MermaidTheme:
|
|
33
45
|
nodes = data.get("nodes", {}) if isinstance(data.get("nodes"), dict) else {}
|
|
34
46
|
|
|
@@ -52,6 +64,13 @@ def _mermaid_theme_from_dict(data: dict, base: MermaidTheme) -> MermaidTheme:
|
|
|
52
64
|
standard_link_arrow=_coerce_color(
|
|
53
65
|
data.get("standard_link_arrow"), base.standard_link_arrow
|
|
54
66
|
),
|
|
67
|
+
node_text=_coerce_optional_color(data.get("node_text"), base.node_text),
|
|
68
|
+
edge_label_border=_coerce_optional_color(
|
|
69
|
+
data.get("edge_label_border"), base.edge_label_border
|
|
70
|
+
),
|
|
71
|
+
edge_label_border_width=_coerce_optional_int(
|
|
72
|
+
data.get("edge_label_border_width"), base.edge_label_border_width
|
|
73
|
+
),
|
|
55
74
|
)
|
|
56
75
|
|
|
57
76
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.4.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/adapters/__init__.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/adapters/config.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/adapters/unifi.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/laptop.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/assets/icons/server.svg
RENAMED
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/cli/__init__.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/cli/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/mock_data.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/io/mock_generate.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/__init__.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/labels.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/model/topology.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/lldp_md.py
RENAMED
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps/render/svg_theme.py
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/requires.txt
RENAMED
|
File without changes
|
{unifi_network_maps-1.4.2 → unifi_network_maps-1.4.4}/src/unifi_network_maps.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|