From 09dfd0377a0193a104a13136f38b744472232e0d Mon Sep 17 00:00:00 2001 From: iamjohnnymac <33052970+iamjohnnymac@users.noreply.github.com> Date: Tue, 19 May 2026 09:21:07 +0800 Subject: [PATCH 1/2] fix: Brown strand colour badge renders as actual brown (v0.3.6) NetBox's badge palette doesn't include 'brown' as a recognised colour, so .badge.text-bg-brown fell through to the default dark surface and was unreadable. Override with #8b4513 (saddle brown) so TIA-598 position 4 looks like a brown fibre. CSS-only one-line addition. Spotted during the v0.3.5 visual self-audit. --- CHANGELOG.md | 14 +++++++++++++- netbox_osp/__init__.py | 2 +- netbox_osp/static/netbox_osp/css/netbox-osp.css | 10 ++++++++++ pyproject.toml | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d14535..c74300a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,17 @@ Per-release NetBox / Python compatibility lives in ## [Unreleased] +## [0.3.6] — 2026-05-19 + +### Fixed + +- **Brown strand colour badges now render in actual brown.** TIA-598 + position 4 is Brown; NetBox doesn't ship `text-bg-brown` in its + badge palette so the class fell through to a near-black default. + Added an explicit CSS override (`#8b4513` saddle brown) so a Brown + strand looks brown on the strand list, tube list, and detail pages. + Spotted during the v0.3.5 visual audit on CT 109. + ## [0.3.5] — 2026-05-19 ### Fixed @@ -401,7 +412,8 @@ GPS markers. - PyPI name-reservation placeholder. Not functional. -[Unreleased]: https://github.com/iamjohnnymac/netbox-osp/compare/v0.3.5...HEAD +[Unreleased]: https://github.com/iamjohnnymac/netbox-osp/compare/v0.3.6...HEAD +[0.3.6]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.6 [0.3.5]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.5 [0.3.4]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.4 [0.3.3]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.3 diff --git a/netbox_osp/__init__.py b/netbox_osp/__init__.py index f1515a1..29bae13 100644 --- a/netbox_osp/__init__.py +++ b/netbox_osp/__init__.py @@ -5,7 +5,7 @@ class NetBoxOspConfig(PluginConfig): name = "netbox_osp" verbose_name = "NetBox OSP" description = "Outside-plant fibre management — cables, splice closures, fibre links with loss budgets, and an offline-capable Leaflet plant map." - version = "0.3.5" + version = "0.3.6" author = "John McKean" author_email = "33052970+iamjohnnymac@users.noreply.github.com" base_url = "osp" diff --git a/netbox_osp/static/netbox_osp/css/netbox-osp.css b/netbox_osp/static/netbox_osp/css/netbox-osp.css index ee26131..6f4190f 100644 --- a/netbox_osp/static/netbox_osp/css/netbox-osp.css +++ b/netbox_osp/static/netbox_osp/css/netbox-osp.css @@ -322,6 +322,16 @@ border: 1px solid #999999 !important; } +/* "brown" isn't in NetBox's badge palette (azure/black/blue/cyan/gray/ + green/indigo/lime/orange/pink/purple/red/teal/white/yellow). Without + this override the .badge.text-bg-brown class falls through to the + default dark surface and is unreadable. TIA-598 position 4 is Brown; + we want it to render saddle-brown like a real fibre. */ +.badge.text-bg-brown { + background-color: #8b4513 !important; + color: #ffffff !important; +} + /* Summary band — sits above the graph card. */ .osp-tracer-summary { display: flex; diff --git a/pyproject.toml b/pyproject.toml index 2cc27a0..0f9407b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netbox-osp" -version = "0.3.5" +version = "0.3.6" description = "Outside-plant fibre management for NetBox — cables, splice closures, fibre links with loss budgets, and an offline-capable Leaflet plant map." authors = [{ name = "John McKean", email = "33052970+iamjohnnymac@users.noreply.github.com" }] maintainers = [{ name = "John McKean", email = "33052970+iamjohnnymac@users.noreply.github.com" }] From 4530d0b0cea57f75ba38de38f3faf5178ee28dc9 Mon Sep 17 00:00:00 2001 From: iamjohnnymac <33052970+iamjohnnymac@users.noreply.github.com> Date: Tue, 19 May 2026 09:28:52 +0800 Subject: [PATCH 2/2] fix: strand+trunkbreakout templates - Colour badge bg_color + plugin slots (v0.3.7) Three audit findings bundled into v0.3.7 (was going to be v0.3.6 Brown-only): 1. Brown badge CSS override (saddle brown #8b4513) - already on branch 2. strand.html line 19: {% badge object.get_color_display %} didn't pass bg_color, so even with v0.3.5's get_color_color() helper the detail page Colour rendered as grey. Now passes bg_color=object.get_color_color and matches list-view fidelity. 3. strand.html + trunkbreakout.html were missed in v0.3.1's plugin- slot pass; now load {% load plugins %} and render plugin_left_page / plugin_right_page / plugin_full_width_page so Attachments / Documents / other plugin cards appear on these pages too. All spotted during the v0.3.5 visual self-audit on CT 109. --- CHANGELOG.md | 22 +++++++++++++++---- netbox_osp/__init__.py | 2 +- netbox_osp/templates/netbox_osp/strand.html | 10 ++++++++- .../templates/netbox_osp/trunkbreakout.html | 8 +++++++ pyproject.toml | 2 +- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c74300a..b6b63ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ Per-release NetBox / Python compatibility lives in ## [Unreleased] -## [0.3.6] — 2026-05-19 +## [0.3.7] — 2026-05-19 + +Three audit fixes bundled together. ### Fixed @@ -18,7 +20,19 @@ Per-release NetBox / Python compatibility lives in badge palette so the class fell through to a near-black default. Added an explicit CSS override (`#8b4513` saddle brown) so a Brown strand looks brown on the strand list, tube list, and detail pages. - Spotted during the v0.3.5 visual audit on CT 109. +- **Strand detail page Colour badge now uses the helper.** The + `strand.html` template called `{% badge object.get_color_display %}` + without `bg_color`, so even though v0.3.5 added the + `get_color_color()` helper, the detail page kept rendering Colour + as grey. Now passes `bg_color=object.get_color_color` and matches + the list-view colour fidelity. +- **`strand.html` and `trunkbreakout.html` now render plugin + template-extension slots.** v0.3.1 wired + `{% plugin_left_page %}` / `{% plugin_right_page %}` / + `{% plugin_full_width_page %}` into the other custom OSP detail + templates, but the strand and trunkbreakout templates were missed. + Attachments, Documents, and any other plugin's per-object cards + are now visible on these two pages. ## [0.3.5] — 2026-05-19 @@ -412,8 +426,8 @@ GPS markers. - PyPI name-reservation placeholder. Not functional. -[Unreleased]: https://github.com/iamjohnnymac/netbox-osp/compare/v0.3.6...HEAD -[0.3.6]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.6 +[Unreleased]: https://github.com/iamjohnnymac/netbox-osp/compare/v0.3.7...HEAD +[0.3.7]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.7 [0.3.5]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.5 [0.3.4]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.4 [0.3.3]: https://github.com/iamjohnnymac/netbox-osp/releases/tag/v0.3.3 diff --git a/netbox_osp/__init__.py b/netbox_osp/__init__.py index 29bae13..c31a1c1 100644 --- a/netbox_osp/__init__.py +++ b/netbox_osp/__init__.py @@ -5,7 +5,7 @@ class NetBoxOspConfig(PluginConfig): name = "netbox_osp" verbose_name = "NetBox OSP" description = "Outside-plant fibre management — cables, splice closures, fibre links with loss budgets, and an offline-capable Leaflet plant map." - version = "0.3.6" + version = "0.3.7" author = "John McKean" author_email = "33052970+iamjohnnymac@users.noreply.github.com" base_url = "osp" diff --git a/netbox_osp/templates/netbox_osp/strand.html b/netbox_osp/templates/netbox_osp/strand.html index e08805a..660e155 100644 --- a/netbox_osp/templates/netbox_osp/strand.html +++ b/netbox_osp/templates/netbox_osp/strand.html @@ -1,5 +1,6 @@ {% extends 'generic/object.html' %} {% load helpers %} +{% load plugins %} {% load static %} {% block head %} @@ -16,13 +17,14 @@
Strand
Cable{{ object.cable|linkify }} Tube{{ object.tube|linkify|default:"—" }} Position{{ object.position }} - Colour{% badge object.get_color_display %} + Colour{% badge object.get_color_display bg_color=object.get_color_color %} Status{% badge object.get_status_display bg_color=object.get_status_color %} Loss (dB){{ object.loss_db|floatformat:3 }} {# PR E — visual core tracer entry point #} {% include 'netbox_osp/inc/trace_button.html' %} + {% plugin_left_page object %}
@@ -41,6 +43,12 @@
Linked physical cable
{% include 'inc/panels/tags.html' %} + {% plugin_right_page object %} + + +
+
+ {% plugin_full_width_page object %}
{% endblock %} diff --git a/netbox_osp/templates/netbox_osp/trunkbreakout.html b/netbox_osp/templates/netbox_osp/trunkbreakout.html index 67402be..daa7b8d 100644 --- a/netbox_osp/templates/netbox_osp/trunkbreakout.html +++ b/netbox_osp/templates/netbox_osp/trunkbreakout.html @@ -1,5 +1,6 @@ {% extends 'generic/object.html' %} {% load helpers %} +{% load plugins %} {% block content %}
@@ -15,10 +16,17 @@
Trunk Breakout
Description{{ object.description|default:"—" }}
+ {% plugin_left_page object %}
{% include 'inc/panels/tags.html' %} {% include 'inc/panels/custom_fields.html' %} + {% plugin_right_page object %} +
+ +
+
+ {% plugin_full_width_page object %}
{% endblock %} diff --git a/pyproject.toml b/pyproject.toml index 0f9407b..c774ca5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netbox-osp" -version = "0.3.6" +version = "0.3.7" description = "Outside-plant fibre management for NetBox — cables, splice closures, fibre links with loss budgets, and an offline-capable Leaflet plant map." authors = [{ name = "John McKean", email = "33052970+iamjohnnymac@users.noreply.github.com" }] maintainers = [{ name = "John McKean", email = "33052970+iamjohnnymac@users.noreply.github.com" }]