Web UI search results with one item should go to the item #2192

Closed
opened 2025-12-29 17:23:11 +01:00 by adam · 4 comments
Owner

Originally created by @mmahacek on GitHub (Dec 11, 2018).

Environment

  • Python version: 2.5.0
  • NetBox version: 3.6.x

Proposed Functionality

When using the web interface to search, if there is only one object returned, go directly to that item instead of showing the search results.

Use Case

If there are not multiple items found, this will help the user get directly to what they are searching for.

Database Changes

None

External Dependencies

None

Originally created by @mmahacek on GitHub (Dec 11, 2018). ### Environment * Python version: 2.5.0 * NetBox version: 3.6.x <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality When using the web interface to search, if there is only one object returned, go directly to that item instead of showing the search results. <!-- 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 If there are not multiple items found, this will help the user get directly to what they are searching for. <!-- 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 17:23:12 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 11, 2018):

The current behavior was implemented so as not to confuse a user who expects to see multiple results. For example, suppose you know there should be two core switches named core1 and core2, but one has been been mistakenly renamed. When you search for "core" you'd be automatically directed to the only result. It's not immediately apparent why.

While admittedly not as efficient, it is consistent. (There was discussion around this a while back but I can't find it.)

@jeremystretch commented on GitHub (Dec 11, 2018): The current behavior was implemented so as not to confuse a user who expects to see multiple results. For example, suppose you know there should be two core switches named core1 and core2, but one has been been mistakenly renamed. When you search for "core" you'd be automatically directed to the only result. It's not immediately apparent why. While admittedly not as efficient, it is consistent. (There was discussion around this a while back but I can't find it.)
Author
Owner

@mmahacek commented on GitHub (Dec 11, 2018):

That does make sense, and seems more useful to everyone than my use case. Would be nice to have an option/modifier to switch to this mode, but it doesn't sound reasonable to allocate development time to this based on the current functionality.

@mmahacek commented on GitHub (Dec 11, 2018): That does make sense, and seems more useful to everyone than my use case. Would be nice to have an option/modifier to switch to this mode, but it doesn't sound reasonable to allocate development time to this based on the current functionality.
Author
Owner

@tyler-8 commented on GitHub (Dec 11, 2018):

If the search box were something more dynamic I would say this could be better visualized in a live search result dropdown beneath the search bar, but with the current UI that behavior would be unexpected/unclear to me.

@tyler-8 commented on GitHub (Dec 11, 2018): If the search box were something more dynamic I would say this could be better visualized in a live search result dropdown beneath the search bar, but with the current UI that behavior would be unexpected/unclear to me.
Author
Owner

@jeremystretch commented on GitHub (Dec 11, 2018):

Alrighty. We don't have the resources at the moment to do any substantial work on the search feature, so I'm going to close this out.

@jeremystretch commented on GitHub (Dec 11, 2018): Alrighty. We don't have the resources at the moment to do any substantial work on the search feature, so I'm going to close this out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2192