Devices: Add ability to filter by location including nested locations #4743

Closed
opened 2025-12-29 19:20:03 +01:00 by adam · 3 comments
Owner

Originally created by @dreng on GitHub (Apr 8, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.0-dev

Feature type

New functionality

Proposed functionality

On the devices page it is possible to filter by locations already. It would be very handy to have the ability to select a location with an additional checkbox "Include children", preferably initially checked. If the checkbox is checked every device in the chosen location and every device in all locations that are children of the chosen location should be shown.

Use case

Let's assume you have many nested locations (e.g. 5 floors, containing 20 rooms each). In order to get an overview of all devices belonging to a floor and all the rooms it contains you have to choose 21 locations in the filter pane.

In contrast it's necessary to choose just one location (and probably a checkbox) with this feature.

Database changes

none

External dependencies

none

Originally created by @dreng on GitHub (Apr 8, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.0-dev ### Feature type New functionality ### Proposed functionality On the devices page it is possible to filter by locations already. It would be very handy to have the ability to select a location with an additional checkbox "Include children", preferably initially checked. If the checkbox is checked every device in the chosen location and every device in all locations that are children of the chosen location should be shown. ### Use case Let's assume you have many nested locations (e.g. 5 floors, containing 20 rooms each). In order to get an overview of all devices belonging to a floor and all the rooms it contains you have to choose 21 locations in the filter pane. In contrast it's necessary to choose just one location (and probably a checkbox) with this feature. ### Database changes none ### External dependencies none
adam added the type: bugstatus: acceptedbeta labels 2025-12-29 19:20:03 +01:00
adam closed this issue 2025-12-29 19:20:03 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 9, 2021):

In order to get an overview of all devices belonging to a floor and all the rooms it contains you have to choose 21 locations in the filter pane.

The location filter (like the filters for region, site group, etc.) is hierarchical in nature: You only need to select the floor, and it will match all devices assigned to either the floor or to a location within the floor.

@jeremystretch commented on GitHub (Apr 9, 2021): > In order to get an overview of all devices belonging to a floor and all the rooms it contains you have to choose 21 locations in the filter pane. The location filter (like the filters for region, site group, etc.) is hierarchical in nature: You only need to select the floor, and it will match all devices assigned to either the floor or to a location within the floor.
Author
Owner

@dreng commented on GitHub (Apr 9, 2021):

I'm sorry, but I would have sworn that I have tested exactly that scenario and got another result. I have to admit that you're right.

Probably I had the locations view in mind. If you go to locations and select e.g. Floor 1 then only devices belonging to exactly that location are being listed. That might be intended. I'd prefer a resursive view.

@dreng commented on GitHub (Apr 9, 2021): I'm sorry, but I would have sworn that I have tested exactly that scenario and got another result. I have to admit that you're right. Probably I had the locations view in mind. If you go to locations and select e.g. Floor 1 then only devices belonging to exactly that location are being listed. That might be intended. I'd prefer a resursive view.
Author
Owner

@dreng commented on GitHub (Apr 12, 2021):

I'm not sure if we misunderstood each other but this seems to be not implemented in the current feature branch.

See this:
2021-04-12 10_36_44-Window

But that:
2021-04-12 10_38_00-Window

@dreng commented on GitHub (Apr 12, 2021): I'm not sure if we misunderstood each other but this seems to be not implemented in the current feature branch. See this: ![2021-04-12 10_36_44-Window](https://user-images.githubusercontent.com/20901110/114367546-d5ca7f80-9b7c-11eb-9d20-b096b251b0d0.png) But that: ![2021-04-12 10_38_00-Window](https://user-images.githubusercontent.com/20901110/114367565-d9f69d00-9b7c-11eb-9e46-2a76fab0d546.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4743