Skip to content

Object counts dashboard widget filters should employ standard UI filters rather than low-level queryset filters #12742

@jeremystretch

Description

@jeremystretch

NetBox version

v3.5.2

Python version

3.8

Steps to Reproduce

When configuring an "object counts" dashboard widget to employ arbitrary filtering parameters, the user is expected to enter valid low-level queryset filters, as opposed to the high-level filters utilized externally by the UI and API.

For example, filtering a list of objects by tenant slug is done in the UI as:

?tenant=my-tenant

This maps to an underlying queryset filter of

tenant__slug=my-tenant

Configuring filters for an object counts dashboard widget currently requires the later form, which differs from every other area of the UI.

Expected Behavior

Filter configuration should be defined in the format consistent with other areas of the UI (the first format in the above example), as is the case for object list widget URL parameters.

Observed Behavior

Filter configurations that are not valid queryset filter parameters will trigger a validation failure when attempting to save the widget configuration.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions