Inconsistent rack count behaviour in rack groups in /dcim/sites/site_name #4128

Closed
opened 2025-12-29 18:33:19 +01:00 by adam · 2 comments
Owner

Originally created by @cpmills1975 on GitHub (Sep 22, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6
  • NetBox version: 2.9.3

Steps to Reproduce

  1. Create a site
  2. Add a rack group to the site
  3. Add a sub rack-group to the rack group created in 2
  4. Add another sub rack-group to the rack group created in 3 (may not be required)
  5. Add some racks to the rack group created in 4
  6. View the rack groups page /dcim/rack-groups and confirm the count of racks cascades correctly from the top level rack group right down to the lowest level rack group.
  7. View the site page /dcim/sites/site_name
  8. See the count of racks next to each rack group in the Rack Groups panel
  9. Compare this to the rack elevation shown when clicking on the "View elevations" button to the right of each row in the Rack Groups panel.

Expected Behavior

The count of racks in each sub-group should behave in a similar manner to the dcim/rack-groups page in that it should includes both direct descendent racks and all racks from child sub-groups. The rack elevation correctly shows this.

Observed Behavior

The count appears to be made up only of racks that are a direct descendent of the rack group and does not include the racks contained in child sub-groups yet the view elevation button does.

Originally created by @cpmills1975 on GitHub (Sep 22, 2020). Originally assigned to: @jeremystretch on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss 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, and that any plugins have been disabled. --> ### Environment * Python version: 3.6 * NetBox version: 2.9.3 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Create a site 2. Add a rack group to the site 3. Add a sub rack-group to the rack group created in 2 4. Add another sub rack-group to the rack group created in 3 (may not be required) 5. Add some racks to the rack group created in 4 6. View the rack groups page /dcim/rack-groups and confirm the count of racks cascades correctly from the top level rack group right down to the lowest level rack group. 7. View the site page /dcim/sites/site_name 8. See the count of racks next to each rack group in the Rack Groups panel 9. Compare this to the rack elevation shown when clicking on the "View elevations" button to the right of each row in the Rack Groups panel. <!-- What did you expect to happen? --> ### Expected Behavior The count of racks in each sub-group should behave in a similar manner to the dcim/rack-groups page in that it should includes both direct descendent racks and all racks from child sub-groups. The rack elevation correctly shows this. <!-- What happened instead? --> ### Observed Behavior The count appears to be made up only of racks that are a direct descendent of the rack group and does not include the racks contained in child sub-groups yet the view elevation button does.
adam added the status: acceptedtype: feature labels 2025-12-29 18:33:19 +01:00
adam closed this issue 2025-12-29 18:33:20 +01:00
Author
Owner

@kobayashi commented on GitHub (Sep 23, 2020):

The rack group table in site view shows actual rack count of each rack group. IMO displaying cumulative rack-count in parent rack group will be confusing in the site view.

@kobayashi commented on GitHub (Sep 23, 2020): The rack group table in site view shows actual rack count of each rack group. IMO displaying cumulative rack-count in parent rack group will be confusing in the site view.
Author
Owner

@jeremystretch commented on GitHub (Sep 23, 2020):

The count of racks in each sub-group should behave in a similar manner to the dcim/rack-groups

I have to agree with this: We should be consistent in conveying rack counts. It would also help to show the rack groups in a hierarchical arrangement under the site view. (This was never updated when support for nested rack groups was introduced in #1754.)

@jeremystretch commented on GitHub (Sep 23, 2020): > The count of racks in each sub-group should behave in a similar manner to the dcim/rack-groups I have to agree with this: We should be consistent in conveying rack counts. It would also help to show the rack groups in a hierarchical arrangement under the site view. (This was never updated when support for nested rack groups was introduced in #1754.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4128