Add General Search to Console/Power/InterfaceConnection Views #3211

Closed
opened 2025-12-29 18:26:46 +01:00 by adam · 5 comments
Owner

Originally created by @zachmoody on GitHub (Jan 23, 2020).

Environment

  • Python version: 3.6.9
  • NetBox version: 2.6.12

Proposed Functionality

Add a general CharFilter field search to Console/Power/InterfaceConnections views, similar to the q filters found elsewhere that allow filtering by partial device name.

Use Case

Before 80d1f80b61 the Console/Power/InterfaceConnectionFilter's filter_device method searched partial device names. That's since been replaced with a select2 form field for device, but that approach somewhat limits the ability to search for a group of connections that share the same partial device names for export into CSV or export templates for things like cable labels.

Database Changes

N/A

External Dependencies

N/A

Originally created by @zachmoody on GitHub (Jan 23, 2020). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss 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.6.9 * NetBox version: 2.6.12 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Add a general `CharFilter` field search to Console/Power/InterfaceConnections views, similar to the `q` filters found elsewhere that allow filtering by partial device name. <!-- 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 Before https://github.com/netbox-community/netbox/commit/80d1f80b61e7887bc6c2a88244b0bf2f16f84e17 the Console/Power/InterfaceConnectionFilter's filter_device method searched partial device names. That's since been replaced with a select2 form field for device, but that approach somewhat limits the ability to search for a group of connections that share the same partial device names for export into CSV or export templates for things like cable labels. <!-- 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 N/A <!-- 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 N/A
adam closed this issue 2025-12-29 18:26:46 +01:00
Author
Owner

@zachmoody commented on GitHub (Jan 23, 2020):

👋 Happy to make the PR on this, just wanted to know if it's a feature yall want and if that's a decent approach.

@zachmoody commented on GitHub (Jan 23, 2020): :wave: Happy to make the PR on this, just wanted to know if it's a feature yall want and if that's a decent approach.
Author
Owner

@stale[bot] commented on GitHub (Feb 6, 2020):

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.

@stale[bot] commented on GitHub (Feb 6, 2020): 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

@DanSheps commented on GitHub (Feb 7, 2020):

Hey @zachmoody,

Sorry I didn't catch this. Is this something that the q= filter is not catching?

@DanSheps commented on GitHub (Feb 7, 2020): Hey @zachmoody, Sorry I didn't catch this. Is this something that the q= filter is not catching?
Author
Owner

@zachmoody commented on GitHub (Feb 7, 2020):

Hey @DanSheps 👋 - well I'm looking to see if a q= filter is something yall would be open to adding on these endpoints, afaict, there isn't one there now.

I did make a pass at if we could use the q= filter on Cables instead but ran into an issue of there of it being limited in scope to just cable labels (iirc) and not the devices they're connected to.

@zachmoody commented on GitHub (Feb 7, 2020): Hey @DanSheps 👋 - well I'm looking to see if a q= filter is something yall would be open to adding on these endpoints, afaict, there isn't one there now. I did make a pass at if we could use the q= filter on Cables instead but ran into an issue of there of it being limited in scope to just cable labels (iirc) and not the devices they're connected to.
Author
Owner

@jeremystretch commented on GitHub (Feb 14, 2020):

This should be covered by #2101, which applies to all models/views. Honestly there's probably not much left to do for that one at this point. I'll take another look at it.

@jeremystretch commented on GitHub (Feb 14, 2020): This should be covered by #2101, which applies to _all_ models/views. Honestly there's probably not much left to do for that one at this point. I'll take another look at it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3211