Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend filter forms to support filter modifiers #7604

Open
jeremystretch opened this issue Oct 21, 2021 · 8 comments
Open

Extend filter forms to support filter modifiers #7604

jeremystretch opened this issue Oct 21, 2021 · 8 comments
Labels
status: needs milestone Awaiting prioritization for inclusion with a future NetBox release type: feature Introduction of new functionality to the application
Projects

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.0.8

Feature type

Change to existing functionality

Proposed functionality

When viewing a list of objects in the NetBox UI, a "filters" tab is present and lists all of the available filters for the relevant model. However, these filters utilize only the default behavior of each filter, and don't allow for modifications to the filter expressions defined here.

This FR proposes to extend the filter forms to include a dropdown widget for each appropriate field, allowing the user to select the desired logic. For example, when filtering by an integer value, the default behavior will be "equals," but options for "less than" (lt) and "greater than" (gt) will also be available.

Use case

Although these filter expressions are technically available and working in the current release, this addition to the user interface would make them much more convenient to use.

Database changes

No response

External dependencies

No response

@jeremystretch jeremystretch added the type: feature Introduction of new functionality to the application label Oct 21, 2021
@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Nov 5, 2021
@jeremystretch
Copy link
Member Author

Per #7587 this should also include the ability to negate/invert a filter.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Feb 12, 2022
@jeremystretch jeremystretch added status: needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Mar 14, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Jul 27, 2022
@jeremystretch jeremystretch added this to the v3.4 milestone Jul 27, 2022
@jeremystretch jeremystretch added this to Core in Roadmap Aug 24, 2022
@jeremystretch
Copy link
Member Author

We should explore what's feasible for #10352 first, as we can likely build on that solution to implement this.

@jsenecal
Copy link
Contributor

So, I was thinking of something like this:
image

I still have yet to find the proper way of doing it within Django but this is the gist of it. I was thinking of adding this under some sort of "advanced search" accordion.

Does this makes sense to you ?

@jeremystretch
Copy link
Member Author

I would prefer to keep each of the filters displayed individually under the "filters" tab, rather than requiring the use to select the desired filter(s) from a dropdown. Additionally, this sort of matrix only seems to makes sense where the user needs to supply a value. When filtering by related objects, an option to invert the logic (excluding the selected objects) seems sufficient.

@jeremystretch
Copy link
Member Author

Per @jsenecal unfortunately this won't be done in time for the v3.4 beta, so I'm going to drop it from the milestone.

@jeremystretch jeremystretch removed this from the v3.4 milestone Nov 2, 2022
@jeremystretch
Copy link
Member Author

@jsenecal do you still want to tackle this?

@jsenecal
Copy link
Contributor

Not sure I'm up to the task, work has the better part of me lately, I'll unassign myself.

@jsenecal jsenecal removed their assignment Jan 25, 2023
@jeremystretch jeremystretch added status: needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: accepted This issue has been accepted for implementation labels Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs milestone Awaiting prioritization for inclusion with a future NetBox release type: feature Introduction of new functionality to the application
Projects
No open projects
Development

No branches or pull requests

2 participants