Display Circuits Count in the Site Table View #11705

Open
opened 2025-12-29 21:48:51 +01:00 by adam · 1 comment
Owner

Originally created by @damsitt on GitHub (Oct 7, 2025).

NetBox version

4.4.2

Feature type

Change to existing functionality

Proposed functionality

Currently, the Site list view (/dcim/sites/) does not display the number of Circuits associated with each Site, even though this information is available via the API (/api/dcim/sites/ → circuit_count field).
It would be very useful to include this count directly in the Site table view, similar to how device counts are displayed.

Use case

For network teams managing multiple locations, being able to see the circuit count at a glance helps with:

Quickly identifying which sites have active WAN links

Capacity planning and troubleshooting connectivity issues

Reducing the need to open each site individually or use the API

Database changes

No response

External dependencies

This enhancement would make the Site table more informative and consistent with other object views that already display related object counts.

Originally created by @damsitt on GitHub (Oct 7, 2025). ### NetBox version 4.4.2 ### Feature type Change to existing functionality ### Proposed functionality Currently, the Site list view (/dcim/sites/) does not display the number of Circuits associated with each Site, even though this information is available via the API (/api/dcim/sites/ → circuit_count field). It would be very useful to include this count directly in the Site table view, similar to how device counts are displayed. ### Use case For network teams managing multiple locations, being able to see the circuit count at a glance helps with: Quickly identifying which sites have active WAN links Capacity planning and troubleshooting connectivity issues Reducing the need to open each site individually or use the API ### Database changes _No response_ ### External dependencies This enhancement would make the Site table more informative and consistent with other object views that already display related object counts.
adam added the type: featurestatus: needs ownercomplexity: mediumnetbox labels 2025-12-29 21:48:51 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 9, 2025):

I'm opening this for work under the condition that the count of circuits associated with each site not be hard-coded into the view's queryset (as device_count and asn_count are currently). This is important to avoid introducing additional overhead when not needed to render the table (i.e. because the applicable column is not being displayed).

(We'd like to remove the current hard-coded annotations at some point as well, but circuits especially are concerning from a performance standpoint as the relationship must traverse a generic foreign key on the CircuitTermination model.)

@jeremystretch commented on GitHub (Oct 9, 2025): I'm opening this for work under the condition that the count of circuits associated with each site _not_ be hard-coded into the view's queryset (as `device_count` and `asn_count` are currently). This is important to avoid introducing additional overhead when not needed to render the table (i.e. because the applicable column is not being displayed). (We'd like to remove the current hard-coded annotations at some point as well, but circuits especially are concerning from a performance standpoint as the relationship must traverse a generic foreign key on the CircuitTermination model.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11705