diff --git a/docs/release-notes/version-3.5.md b/docs/release-notes/version-3.5.md index 168f15fcb..ebf47800e 100644 --- a/docs/release-notes/version-3.5.md +++ b/docs/release-notes/version-3.5.md @@ -2,6 +2,12 @@ ## v3.5.1 (FUTURE) +## Enhancements + +* [#10759](https://github.com/netbox-community/netbox/issues/10759) - Support Markdown rendering for custom field descriptions +* [#11422](https://github.com/netbox-community/netbox/issues/11422) - Match on power panel name when searching for power feeds +* [#11504](https://github.com/netbox-community/netbox/issues/11504) - Add filter to select individual racks under rack elevations view + ### Bug Fixes * [#12367](https://github.com/netbox-community/netbox/issues/12367) - Fix `RelatedObjectDoesNotExist` exception under certain conditions (regression from #11550) @@ -15,6 +21,7 @@ * [#12410](https://github.com/netbox-community/netbox/issues/12410) - Fix base path for OpenAPI schema (fixes Swagger UI requests) * [#12412](https://github.com/netbox-community/netbox/issues/12412) - Device/VM interface MAC addresses can be nullified via REST API * [#12415](https://github.com/netbox-community/netbox/issues/12415) - Fix `ImportError` exception when running RQ worker +* [#12433](https://github.com/netbox-community/netbox/issues/12433) - Correct the application of URL query parameters for object list dashboard widgets * [#12436](https://github.com/netbox-community/netbox/issues/12436) - Remove extraneous "add" button from contact assignments list --- diff --git a/netbox/dcim/filtersets.py b/netbox/dcim/filtersets.py index 207fb6d00..fccaa72f0 100644 --- a/netbox/dcim/filtersets.py +++ b/netbox/dcim/filtersets.py @@ -1900,6 +1900,7 @@ class PowerFeedFilterSet(NetBoxModelFilterSet, CabledObjectFilterSet, PathEndpoi return queryset qs_filter = ( Q(name__icontains=value) | + Q(power_panel__name__icontains=value) | Q(comments__icontains=value) ) return queryset.filter(qs_filter) diff --git a/netbox/dcim/forms/filtersets.py b/netbox/dcim/forms/filtersets.py index a00c7fe26..d31bba030 100644 --- a/netbox/dcim/forms/filtersets.py +++ b/netbox/dcim/forms/filtersets.py @@ -298,6 +298,15 @@ class RackFilterForm(TenancyFilterForm, ContactModelFilterForm, NetBoxModelFilte class RackElevationFilterForm(RackFilterForm): + fieldsets = ( + (None, ('q', 'filter_id', 'tag')), + ('Location', ('region_id', 'site_group_id', 'site_id', 'location_id', 'id')), + ('Function', ('status', 'role_id')), + ('Hardware', ('type', 'width', 'serial', 'asset_tag')), + ('Tenant', ('tenant_group_id', 'tenant_id')), + ('Contacts', ('contact', 'contact_role', 'contact_group')), + ('Weight', ('weight', 'max_weight', 'weight_unit')), + ) id = DynamicModelMultipleChoiceField( queryset=Rack.objects.all(), label=_('Rack'), diff --git a/netbox/extras/dashboard/widgets.py b/netbox/extras/dashboard/widgets.py index 9cd53763a..69d1cc36d 100644 --- a/netbox/extras/dashboard/widgets.py +++ b/netbox/extras/dashboard/widgets.py @@ -229,7 +229,11 @@ class ObjectListWidget(DashboardWidget): htmx_url = reverse(viewname) except NoReverseMatch: htmx_url = None - if parameters := self.config.get('url_params'): + parameters = self.config.get('url_params') or {} + if page_size := self.config.get('page_size'): + parameters['per_page'] = page_size + + if parameters: try: htmx_url = f'{htmx_url}?{urlencode(parameters, doseq=True)}' except ValueError: @@ -238,7 +242,6 @@ class ObjectListWidget(DashboardWidget): 'viewname': viewname, 'has_permission': has_permission, 'htmx_url': htmx_url, - 'page_size': self.config.get('page_size'), }) diff --git a/netbox/templates/extras/dashboard/widgets/objectlist.html b/netbox/templates/extras/dashboard/widgets/objectlist.html index 76c4e658c..54f8094b3 100644 --- a/netbox/templates/extras/dashboard/widgets/objectlist.html +++ b/netbox/templates/extras/dashboard/widgets/objectlist.html @@ -1,5 +1,5 @@ {% if htmx_url and has_permission %} -
+
{% elif htmx_url %}
No permission to view this content.