Only show one level of locations in SiteView and LocationView #5199

Closed
opened 2025-12-29 19:25:21 +01:00 by adam · 4 comments
Owner

Originally created by @koh6uawi on GitHub (Aug 18, 2021).

NetBox version

v3.0-beta2

Feature type

Change to existing functionality

Proposed functionality

  1. Display only locations without parents in SiteView.
  2. Display only direct children in LocationView.

I can open a PR if needed.

Use case

Some of our sites and locations contains a lot of nested sub-locations. Displaying all of them in one view makes it quite difficult to use the page:

  1. one has to scroll a lot before seeing the images in SiteView;
  2. it is quite difficult to spot a location in the list.

Database changes

None (I think).

External dependencies

None.

Originally created by @koh6uawi on GitHub (Aug 18, 2021). ### NetBox version v3.0-beta2 ### Feature type Change to existing functionality ### Proposed functionality 1. Display only locations without parents in `SiteView`. 2. Display only direct children in `LocationView`. I can open a PR if needed. ### Use case Some of our sites and locations contains a lot of nested sub-locations. Displaying all of them in one view makes it quite difficult to use the page: 1. one has to scroll a lot before seeing the images in `SiteView`; 2. it is quite difficult to spot a location in the list. ### Database changes None (I think). ### External dependencies None.
adam added the type: featurepending closure labels 2025-12-29 19:25:21 +01:00
adam closed this issue 2025-12-29 19:25:21 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 23, 2021):

This would make it very tedious to find child locations several levels deep from within the site view.

@jeremystretch commented on GitHub (Aug 23, 2021): This would make it very tedious to find child locations several levels deep from within the site view.
Author
Owner

@koh6uawi commented on GitHub (Aug 23, 2021):

In our case, we usually have at most one or two levels of nested locations (for each site, one location per floor and then one nested location for rooms (sometimes more than 100 per floor)).

In my opinion, it is always going to be difficult to visually spot one specific location in a list of hundreds of items, and I think that this is the reason why the search engine exists (we use it quite extensively for these kinds of tasks, and we are very satisfied with it).

LocationView and SiteView are useful (at least for us) as a kind of "overview", to give us an overall glance at the structure of a given site/location, and I think that from this point of view, only displaying direct children could make sense.

But I do understand that this may not be the intented purpose of these views.

Maybe it could be possible to add an option in settings.py to make it optional (I can implement it if you want, but I don't know if adding opt-in/out config flags for "features" matches the best practices of this project)?

If you decide not to implement this, it could be interesting to update SiteView to indent child locations according to their nesting-level (like in RegionView for child regions, by replacing the folder icon with bullets). It could make it a bit easier to visually spot locations when there are a lot of them in a single page.

@koh6uawi commented on GitHub (Aug 23, 2021): In our case, we usually have at most one or two levels of nested locations (for each site, one location per floor and then one nested location for rooms (sometimes more than 100 per floor)). In my opinion, it is always going to be difficult to visually spot one specific location in a list of hundreds of items, and I think that this is the reason why the search engine exists (we use it quite extensively for these kinds of tasks, and we are very satisfied with it). `LocationView` and `SiteView` are useful (at least for us) as a kind of "overview", to give us an overall glance at the structure of a given site/location, and I think that from this point of view, only displaying direct children could make sense. But I do understand that this may not be the intented purpose of these views. Maybe it could be possible to add an option in `settings.py` to make it optional (I can implement it if you want, but I don't know if adding opt-in/out config flags for "features" matches the best practices of this project)? If you decide not to implement this, it could be interesting to update `SiteView` to indent child locations according to their nesting-level (like in `RegionView` for child regions, by replacing the folder icon with bullets). It could make it a bit easier to visually spot locations when there are a lot of them in a single page.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2021):

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.

@github-actions[bot] commented on GitHub (Oct 23, 2021): 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

@github-actions[bot] commented on GitHub (Nov 23, 2021):

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 (Nov 23, 2021): 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#5199