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

Merge branch 'develop' into develop-2.3

This commit is contained in:
Jeremy Stretch
2018-02-06 14:58:11 -05:00
62 changed files with 571 additions and 515 deletions

View File

@@ -321,7 +321,7 @@ class RackListView(ObjectListView):
).prefetch_related(
'devices__device_type'
).annotate(
device_count=Count('devices', distinct=True)
device_count=Count('devices')
)
filter = filters.RackFilter
filter_form = forms.RackFilterForm
@@ -763,10 +763,7 @@ class DeviceBayTemplateBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
#
class DeviceRoleListView(ObjectListView):
queryset = DeviceRole.objects.annotate(
device_count=Count('devices', distinct=True),
vm_count=Count('virtual_machines', distinct=True)
)
queryset = DeviceRole.objects.all()
table = tables.DeviceRoleTable
template_name = 'dcim/devicerole_list.html'
@@ -804,10 +801,7 @@ class DeviceRoleBulkDeleteView(PermissionRequiredMixin, BulkDeleteView):
#
class PlatformListView(ObjectListView):
queryset = Platform.objects.annotate(
device_count=Count('devices', distinct=True),
vm_count=Count('virtual_machines', distinct=True)
)
queryset = Platform.objects.all()
table = tables.PlatformTable
template_name = 'dcim/platform_list.html'