Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match parent-regions in searches when sites have been assigned a child-region #1871

Closed
AriinPHD opened this issue Feb 7, 2018 · 4 comments
Closed
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@AriinPHD
Copy link

AriinPHD commented Feb 7, 2018

Issue type

[X] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.3-b2

Installed on Ubuntu Server 16.04.3 LTS by following the NetBox-provided installation documentation, without deviation.

Description

2 parts:

  1. Requesting that the NetBox frontpage search-bar allows searching for regions. Currently it does not allow this, nor does it have "regions" as a filterable option (read: the drop-down next to search bar does not include "Regions" as an option to filer the search).
  2. Requesting and that parent-regions be discovered by search even when a site is using its child-region. Currently search does not look for regions at all.

Example of usage:
Regions are setup as follows in a "parent -> child -> child of child -> child of child's child" manner.
--> [Country]
........|--> [Region]
..................|--> [City]
...........................|--> [Borough]

With this setup, a Site would be marked with region [Borough]. The region [Borough]is a child of [City] which is a child of [Region] which is a child of [Country]. In an example I want to search up all items available in region [City], but I do not want the Site to have [City] as its configured region. I want [Borough]. Simply to have the option available to really narrow things down.

A more practical example: This allows NetBox users the ability to search for all their New York-based sites despite all the Sites being marked with the "borough" regions such as Manhattan and Bronx.

I hope this is something you'll consider. I believe it will increase both the effectiveness and usefulnes of regions and power the searchbar. So far an RfE for this functionality is the only logical option for this type of usage as well; there are simply no alternatives for searchable parent-child like options in NetBox that I can find.

Thanks for a great product!

@jeremystretch
Copy link
Member

Requesting that the NetBox frontpage search-bar allows searching for regions

The global search does not include any organizational objects. Including these would return far too many irrelevant results. You can search for regions on the regions list.

Requesting and that parent-regions be discovered by search even when a site is using its child-region

This requires additional queryset filter logic; something like this. It would also need to be a separate filter from parent to preserve the ability to filter by exact match only.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Feb 13, 2018
@bdlamprecht
Copy link
Contributor

If I understand what this FR is asking for, I definately can see the need for this in my NetBox environment. Any idea when it could be implemented? Or would you prefer someone create a PR?

@nue-melexis
Copy link

nue-melexis commented Sep 21, 2018

Hi,

I currently have regions for continents, with child regions for countries.
Inside the countries I have the sites (so far).
For me it would be nice to see all the sites in one continent, so kind of recursive showing/counting.

current situation:
image

It would be nice to see a "4" in the count of sites for Asia. This could also be a global setting to turn on/off (recursive_regions).
I hope this is the same like the TO was intended to say.

Best Regards,
Norman

@bdlamprecht
Copy link
Contributor

Awesome!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants