Provide a configuration option to include inventory items in the global search #4477

Closed
opened 2025-12-29 18:36:26 +01:00 by adam · 1 comment
Owner

Originally created by @cpmills1975 on GitHub (Jan 20, 2021).

Environment

  • Python version: 3.9
  • NetBox version: 2.10.3

Proposed Functionality

I know that inventory items are explicitly excluded from the global search for efficiency reasons. However, this needs to be balanced with usability and, as a relatively light user of inventory items, I'd like to be able to try and see if adding these in to the global search negatively impacts the speed of the search or not.

Some users will use inventory items extensively and forcing the search to include these may negatively impact the search experience. I do not (4000 odd devices, at the moment maybe <100 inventory items across the entire estate - I am not yet recording every single line card or every single Hard Disk in every single device!).

I'd like the option, through the configuration to globally include or exclude inventory items from the main search.

Use Case

The only inventory items I have recorded so far are high value line cards that are individually asset labelled - I'd like to be able to search for an asset tag regardless of whether it is a device or an inventory item through the main search form and (assuming I know nothing about an asset tag) not have to search for it twice - once in the main search form or the devices page and again in the inventory items page.

Database Changes

None

External Dependencies

None

Originally created by @cpmills1975 on GitHub (Jan 20, 2021). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.9 * NetBox version: 2.10.3 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality I know that inventory items are explicitly excluded from the global search for efficiency reasons. However, this needs to be balanced with usability and, as a relatively light user of inventory items, I'd like to be able to try and see if adding these in to the global search negatively impacts the speed of the search or not. Some users will use inventory items extensively and forcing the search to include these may negatively impact the search experience. I do not (4000 odd devices, at the moment maybe <100 inventory items across the entire estate - I am not yet recording every single line card or every single Hard Disk in every single device!). I'd like the option, through the configuration to globally include or exclude inventory items from the main search. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case The only inventory items I have recorded so far are high value line cards that are individually asset labelled - I'd like to be able to search for an asset tag regardless of whether it is a device or an inventory item through the main search form and (assuming I know nothing about an asset tag) not have to search for it twice - once in the main search form or the devices page and again in the inventory items page. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes None <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies None
adam closed this issue 2025-12-29 18:36:26 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 20, 2021):

It would not be prudent to introduce a configuration parameter for such a niche change in behavior, especially to deliver relatively little value. (That's how you end up with a thousand little knobs and switches that are nearly impossible to maintain over time.)

A better approach might be to improve the global search form to allow the selection of a subset of models, with the currently available models serving as defaults, and extend it to support inventory items and other models. However, this would need to be fleshed out in a separate FR.

@jeremystretch commented on GitHub (Jan 20, 2021): It would not be prudent to introduce a configuration parameter for such a niche change in behavior, especially to deliver relatively little value. (That's how you end up with a thousand little knobs and switches that are nearly impossible to maintain over time.) A better approach might be to improve the global search form to allow the selection of a subset of models, with the currently available models serving as defaults, and extend it to support inventory items and other models. However, this would need to be fleshed out in a separate FR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4477