diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py
index bcbbf1739..cadaa2d13 100644
--- a/netbox/dcim/views.py
+++ b/netbox/dcim/views.py
@@ -377,21 +377,6 @@ class SiteView(generic.ObjectView):
(Circuit.objects.restrict(request.user, 'view').filter(terminations__site=instance).distinct(), 'site_id'),
)
- locations = Location.objects.add_related_count(
- Location.objects.all(),
- Rack,
- 'location',
- 'rack_count',
- cumulative=True
- )
- locations = Location.objects.add_related_count(
- locations,
- Device,
- 'location',
- 'device_count',
- cumulative=True
- ).restrict(request.user, 'view').filter(site=instance)
-
nonracked_devices = Device.objects.filter(
site=instance,
rack__isnull=True,
@@ -400,7 +385,6 @@ class SiteView(generic.ObjectView):
return {
'related_models': related_models,
- 'locations': locations,
'nonracked_devices': nonracked_devices.order_by('-pk')[:10],
'total_nonracked_devices_count': nonracked_devices.count(),
}
diff --git a/netbox/templates/dcim/inc/nonracked_devices.html b/netbox/templates/dcim/inc/nonracked_devices.html
index d4cd58839..8331357f3 100644
--- a/netbox/templates/dcim/inc/nonracked_devices.html
+++ b/netbox/templates/dcim/inc/nonracked_devices.html
@@ -4,50 +4,10 @@
-
- {% if nonracked_devices %}
-
-
- Name |
- Role |
- Type |
- Parent Device |
-
- {% for device in nonracked_devices %}
-
-
- {{ device }}
- |
- {{ device.device_role }} |
- {{ device.device_type }} |
- {% if device.parent_bay %}
- {{ device.parent_bay.device|linkify }} |
- {{ device.parent_bay }} |
- {% else %}
- — |
- {% endif %}
-
- {% endfor %}
-
-
- {% if total_nonracked_devices_count > nonracked_devices.count %}
- {% if object|meta:'verbose_name' == 'site' %}
-
- Displaying {{ nonracked_devices.count }} of {{ total_nonracked_devices_count }} devices (
View full list)
-
- {% elif object|meta:'verbose_name' == 'location' %}
-
- Displaying {{ nonracked_devices.count }} of {{ total_nonracked_devices_count }} devices (
View full list)
-
- {% endif %}
- {% endif %}
-
- {% else %}
-
- None
-
- {% endif %}
-
+
{% include 'inc/panels/related_objects.html' with filter_name='site_id' %}
{% include 'inc/panels/contacts.html' %}
-
-
-
- {% if locations %}
-
- {% else %}
-
None
- {% endif %}
-
- {% if perms.dcim.add_location %}
-
- {% endif %}
-
{% include 'inc/panels/image_attachments.html' %}
{% plugin_right_page object %}