Searching for circuits between sites, regions or site groups #8588

Closed
opened 2025-12-29 20:38:31 +01:00 by adam · 4 comments
Owner

Originally created by @pv2b on GitHub (Sep 7, 2023).

NetBox version

v3.6.1

Feature type

New functionality

Proposed functionality

I propose that a new option called "Search mode" be added to the circuit filter form, under the "Location" chapter, in the form of a pair of radio buttons, as per this mockup below:

Region(Region selector widget)
Site group(Site group selector widget)
Site(Site selector widget)
Search mode (*) Find circuits to or from the selected locations
( ) Find circuits between the selected locations

The exact UI is open to debate of course. I've tried to keep the labels as short as possible to convey the meaning of the options, while not so short that their meaning is obscured.

I've opted to propose a radio button rather than a drop-down or a checkbox because:

  • A pair of radio buttons clearly shows the user both possible options without making them click a dropdown to see what his options are.
  • I can't think of conside way to convey the same information with a single text label that would go next to a checkbox, making the radio buttons a better option in my opinion.

When "Find circuits to or from the selected locations" is selected, NetBox acts exactly like it does today, i.e. requires either Side A or Side B to match criteria set by the user.

When "Find circuits between the selected locations" is selected, NetBox instead requires both Site A and Site B to match criteria set by the user.

Use case

The original problem I wanted to solve was a recurring need to search for circuits between two busy sites.

Each site may have dozens of links going to it, and because there's no way to tell NetBox that you want all circuits going between Site A and Site B, the only way to do this was to search for the less busy of the two sites, and then Ctrl+F in the browser through the search results. (You can't really use sorting for this because the remote end may be either Site A or Site B.)

By implementing this feature, if a user wants to find what circuits go between Site A and Site B, I could go to the filter form, select Site A and Site B under the Site field, and then select "Find circuits between the selected locations".

As a potentially useful side effect, this would also let a user find all circuits going between any subset of sites. For example, a user might select a Site Group for all their datacenters (as opposed to office locations), and get a list of circuits interconnecting their data centers. Or they could find all links within a Region (but exclude links going out of that region). This addressed use case is just a happy accident of how the proposed feature is designed, but may still be useful.

Database changes

No database changes are required.

External dependencies

No external dependencies are required.

Originally created by @pv2b on GitHub (Sep 7, 2023). ### NetBox version v3.6.1 ### Feature type New functionality ### Proposed functionality I propose that a new option called "Search mode" be added to the circuit filter form, under the "Location" chapter, in the form of a pair of radio buttons, as per this mockup below: <table> <tr><th>Region</th><td>(Region selector widget)</td> <tr><th>Site group</th><td>(Site group selector widget)</td> <tr><th>Site</th><td>(Site selector widget)</td> <tr><th>Search mode</th><td> (*) Find circuits to or from the selected locations<br> ( ) Find circuits between the selected locations </form> </td> </table> The exact UI is open to debate of course. I've tried to keep the labels as short as possible to convey the meaning of the options, while not so short that their meaning is obscured. I've opted to propose a radio button rather than a drop-down or a checkbox because: - A pair of radio buttons clearly shows the user both possible options without making them click a dropdown to see what his options are. - I can't think of conside way to convey the same information with a single text label that would go next to a checkbox, making the radio buttons a better option in my opinion. When "Find circuits to or from the selected locations" is selected, NetBox acts exactly like it does today, i.e. requires *either* Side A *or* Side B to match criteria set by the user. When "Find circuits between the selected locations" is selected, NetBox instead requires *both* Site A *and* Site B to match criteria set by the user. ### Use case The original problem I wanted to solve was a recurring need to search for circuits between two busy sites. Each site may have dozens of links going to it, and because there's no way to tell NetBox that you want all circuits going between Site A and Site B, the only way to do this was to search for the less busy of the two sites, and then Ctrl+F in the browser through the search results. (You can't really use sorting for this because the remote end may be either Site A or Site B.) By implementing this feature, if a user wants to find what circuits go between Site A and Site B, I could go to the filter form, select Site A and Site B under the Site field, and then select "Find circuits between the selected locations". As a potentially useful side effect, this would also let a user find all circuits going between any subset of sites. For example, a user might select a Site Group for all their datacenters (as opposed to office locations), and get a list of circuits interconnecting their data centers. Or they could find all links within a Region (but exclude links going out of that region). This addressed use case is just a happy accident of how the proposed feature is designed, but may still be useful. ### Database changes No database changes are required. ### External dependencies No external dependencies are required.
adam added the type: featurepending closure labels 2025-12-29 20:38:31 +01:00
adam closed this issue 2025-12-29 20:38:32 +01:00
Author
Owner

@pv2b commented on GitHub (Sep 7, 2023):

Possible blocker: Does NetBox use Radio buttons anywhere within the UI? There might need to be some front-end/UI work done to be able to practically show radio buttons in a filter form.

As a workaround, if radio buttons aren't practical with the current UI, the same functionality could be acheived with a drop-down menu, even though in my opinion it's not as good of an option.

I'm willing to volunteer to work on this feature request, with the caveat that if radio buttons end up being too hard to implement within the current scope of NetBox, I'll limit myself to using pre-existing widgets that are proven to work.

@pv2b commented on GitHub (Sep 7, 2023): Possible blocker: Does NetBox use Radio buttons anywhere within the UI? There might need to be some front-end/UI work done to be able to practically show radio buttons in a filter form. As a workaround, if radio buttons aren't practical with the current UI, the same functionality could be acheived with a drop-down menu, even though in my opinion it's not as good of an option. I'm willing to volunteer to work on this feature request, with the caveat that if radio buttons end up being too hard to implement within the current scope of NetBox, I'll limit myself to using pre-existing widgets that are proven to work.
Author
Owner

@pv2b commented on GitHub (Sep 7, 2023):

Oh, it occurs to me that the exact functionality could just as well be added to the "Cables" filter form. In that cases not just on Locations but also on Devices. Adding the same filter to that form itself could be some reasonable scope creep for this FR.

@pv2b commented on GitHub (Sep 7, 2023): Oh, it occurs to me that the exact functionality could just as well be added to the "Cables" filter form. In that cases not just on Locations but also on Devices. Adding the same filter to that form itself could be some reasonable scope creep for this FR.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 7, 2023):

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. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Dec 7, 2023): 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. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Jan 6, 2024):

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 (Jan 6, 2024): 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#8588