From 713556a33edf6e863ef8b97c3af73b21fcdc6114 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 18 Nov 2026 14:28:29 +0100 Subject: [PATCH] fix: cleaner filter layout for the client software overview The filter card gets a balanced layout: tenant group, tenant, a search field with icon and the buttons in one row, below it the client roles as toggle pills (applied immediately) and the filter hint. The broken checkbox styling is gone. The empty state explains how software lists get into NetBox. Co-Authored-By: Claude Opus 5.5 --- netbox_utilities/__init__.py | 2 +- .../netbox_utilities/netbox_utilities.css | 57 ++++++++++++++++ .../netbox_utilities/software_overview.html | 68 ++++++++++++------- pyproject.toml | 2 +- 4 files changed, 101 insertions(+), 28 deletions(-) diff --git a/netbox_utilities/__init__.py b/netbox_utilities/__init__.py index bd861bf..e344170 100644 --- a/netbox_utilities/__init__.py +++ b/netbox_utilities/__init__.py @@ -1,6 +1,6 @@ from netbox.plugins import PluginConfig, get_plugin_config -__version__ = "0.29.1" +__version__ = "0.29.2" class NetBoxUtilitiesConfig(PluginConfig): diff --git a/netbox_utilities/static/netbox_utilities/netbox_utilities.css b/netbox_utilities/static/netbox_utilities/netbox_utilities.css index 049c78b..f4364b3 100644 --- a/netbox_utilities/static/netbox_utilities/netbox_utilities.css +++ b/netbox_utilities/static/netbox_utilities/netbox_utilities.css @@ -564,6 +564,63 @@ a.nbu-disk-slot[draggable="true"] { } /* Client Software Übersicht */ +.nbu-sw-filter-footer { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.75rem 1.5rem; + margin-top: 1rem; + padding-top: 0.875rem; + border-top: 1px solid var(--tblr-border-color); +} + +.nbu-sw-roles { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem; +} + +.nbu-sw-roles-label { + color: var(--tblr-secondary); + font-size: 0.75rem; + font-weight: 600; + letter-spacing: 0.04em; + text-transform: uppercase; + margin-right: 0.25rem; +} + +.nbu-sw-role { + border: 1px solid var(--tblr-border-color); + background: var(--tblr-bg-surface); + color: var(--tblr-body-color); + white-space: nowrap; +} + +.nbu-sw-role:hover { + border-color: var(--tblr-primary); + color: var(--tblr-primary); +} + +.btn-check:checked + .nbu-sw-role { + background: var(--tblr-primary); + border-color: var(--tblr-primary); + color: var(--tblr-primary-fg, #fff); +} + +.btn-check:focus-visible + .nbu-sw-role { + box-shadow: 0 0 0 0.2rem rgba(var(--tblr-primary-rgb), 0.25); +} + +.nbu-sw-filter-hint { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem; + font-size: 0.8125rem; +} + .nbu-sw-kpi-label { color: var(--tblr-secondary); font-size: 0.75rem; diff --git a/netbox_utilities/templates/netbox_utilities/software_overview.html b/netbox_utilities/templates/netbox_utilities/software_overview.html index 3e4faa8..0d4ac59 100644 --- a/netbox_utilities/templates/netbox_utilities/software_overview.html +++ b/netbox_utilities/templates/netbox_utilities/software_overview.html @@ -32,36 +32,47 @@ {{ form.tenant_id }} -
- Gerätrolle - {% for choice in form.role_id %} -
- {{ choice.tag }} - -
- {% empty %} -
Keine Client-Rolle gefunden (software_device_roles)
- {% endfor %} -
-
+
- +
+ + +
- -
- {% if scope_label %} - - Es gilt der globale Mandantenfilter {{ scope_label }}. Eine eigene Auswahl hier hat Vorrang. - {% else %} - Mandantengruppen schließen alle Untergruppen ein. Ohne Gerätrolle werden alle Geräte berücksichtigt. - {% endif %} + +
@@ -194,7 +205,12 @@ {% else %}
- Für diese Auswahl ist keine Software erfasst. +
Für diese Auswahl ist keine Software erfasst
+
+ Softwarelisten des Windows-Agents und des NetBox Synchronizers werden beim Speichern eines Geräts übernommen. + Bereits vorhandene Berichte überträgt einmalig + manage.py netbox_utilities_sync_software. +
{% if can_add %}{% endif %}
{% endif %} diff --git a/pyproject.toml b/pyproject.toml index 65e8a14..7b51acf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "netbox-utilities" -version = "0.29.1" +version = "0.29.2" description = "Navigation, tenant utilities, connection VLANs, partial-width racks, disks, CPU & RAM, switch port export and bulk operations for NetBox 4.6/4.7" readme = "README.md" requires-python = ">=3.12"