Leave out blank filter items from a URL #5924

Closed
opened 2025-12-29 19:34:18 +01:00 by adam · 3 comments
Owner

Originally created by @ryanmerolle on GitHub (Jan 11, 2022).

NetBox version

v3.1.5

Feature type

Change to existing functionality

Proposed functionality

Currently the url for a object/table/view filter is populated with all possible filter items even if said filter item is empty. This can be confusing when you forward said URL to someone.

It would be nice to either have a button to click that would "clean" unneeded characters from a url OR just not populate URLs with empty filter items.

This was discussed on slack months ago, and suggested to be entered as a FR, but I forgot to submit it.

Use case

Example when filter devices by objects you get:

https://demo.netbox.dev/dcim/devices/?q=&status=active&serial=&asset_tag=&mac_address=&has_primary_ip=&virtual_chassis_member=&console_ports=&console_server_ports=&power_ports=&power_outlets=&interfaces=&pass_through_ports=&local_context_data=

Where the filter you could get away with is:

https://demo.netbox.dev/dcim/devices/?q=&status=active
OR
https://demo.netbox.dev/dcim/devices/?status=active

Database changes

N/A

External dependencies

N/A

Originally created by @ryanmerolle on GitHub (Jan 11, 2022). ### NetBox version v3.1.5 ### Feature type Change to existing functionality ### Proposed functionality Currently the url for a object/table/view filter is populated with all possible filter items even if said filter item is empty. This can be confusing when you forward said URL to someone. It would be nice to either have a button to click that would "clean" unneeded characters from a url OR just not populate URLs with empty filter items. This was discussed on slack months ago, and suggested to be entered as a FR, but I forgot to submit it. ### Use case Example when filter devices by objects you get: ``` https://demo.netbox.dev/dcim/devices/?q=&status=active&serial=&asset_tag=&mac_address=&has_primary_ip=&virtual_chassis_member=&console_ports=&console_server_ports=&power_ports=&power_outlets=&interfaces=&pass_through_ports=&local_context_data= ``` Where the filter you could get away with is: ``` https://demo.netbox.dev/dcim/devices/?q=&status=active OR https://demo.netbox.dev/dcim/devices/?status=active ``` ### Database changes N/A ### External dependencies N/A
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 19:34:18 +01:00
adam closed this issue 2025-12-29 19:34:18 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 17, 2022):

AFAIK the only way to accomplish this would be by controlling the form submission with Javascript and filtering out "empty" values from the parameters prior to submission. IMO this does not seem like an appropriate place to spend development effort, particularly given how few people we've seen contribute in a substantial way to NetBox's frontend development, but I'll leave it open for volunteers.

@jeremystretch commented on GitHub (Jan 17, 2022): AFAIK the only way to accomplish this would be by controlling the form submission with Javascript and filtering out "empty" values from the parameters prior to submission. IMO this does not seem like an appropriate place to spend development effort, particularly given how few people we've seen contribute in a substantial way to NetBox's frontend development, but I'll leave it open for volunteers.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 19, 2022):

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[bot] commented on GitHub (Mar 19, 2022): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Apr 18, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Apr 18, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5924