1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #1858: Include device/CM count for cluster list in global search results

This commit is contained in:
Jeremy Stretch
2018-02-02 17:11:46 -05:00
parent 7f5a3fffd3
commit 835d13542f
3 changed files with 5 additions and 7 deletions

View File

@@ -99,10 +99,7 @@ class ClusterGroupBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
#
class ClusterListView(ObjectListView):
queryset = Cluster.objects.annotate(
device_count=Count('devices', distinct=True),
vm_count=Count('virtual_machines', distinct=True)
)
queryset = Cluster.objects.select_related('type', 'group')
table = tables.ClusterTable
filter = filters.ClusterFilter
filter_form = forms.ClusterFilterForm