Skip to content

Remove 'empty' variables from url after search/filter #10352

@PieterL75

Description

@PieterL75

NetBox version

v3.3.2

Feature type

Change to existing functionality

Proposed functionality

When a search or filter is done, the resulting page has an url with all possible fields.
It would be neater if only the field that has data is added to the url variable.
Especially when there are a lot of custom fields.

ex :
https://netbox/dcim/devices/?q=test&serial=&asset_tag=&mac_address=&device_type_id=79&console_ports=&console_server_ports=&power_ports=&power_outlets=&interfaces=&pass_through_ports=&has_primary_ip=&virtual_chassis_member=&local_context_data=&cf_hostname=&cf_ltag=&cf_observium=&cf_observium_id=&cf_reference=&cf_u_bios_uuid=&cf_warrantydate=

could be reduced to

https://netbox/dcim/devices/?q=test&device_type_id=79

Use case

When URLs are shared or stored, it gives a better view in what is going to be filtered.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions