From 0b6a3898fe0970b77928c9cf99588af8c7f2dc4a Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Mon, 3 Oct 2022 10:55:05 -0700 Subject: [PATCH] 8424 device location (#10544) * 8424 fix merge * 8424 fix merge * 8424 fix merge * 8424 fix merge --- netbox/dcim/views.py | 1 + netbox/templates/dcim/device.html | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index 7a6aecc8e..5930d6b2d 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -1616,6 +1616,7 @@ class DeviceView(generic.ObjectView): return { 'services': services, 'vc_members': vc_members, + 'svg_extra': f'highlight=id:{instance.pk}' } diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 253d905f2..d800658a5 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -7,7 +7,7 @@ {% block content %}
-
+
Device @@ -153,7 +153,7 @@ {% include 'inc/panels/comments.html' %} {% plugin_left_page object %}
-
+
Management
@@ -286,6 +286,22 @@
{% include 'inc/panels/contacts.html' %} {% include 'inc/panels/image_attachments.html' %} + {% if object.rack and object.position %} +
+
+
+

Front

+ {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='front' extra_params=svg_extra %} +
+
+
+
+

Rear

+ {% include 'dcim/inc/rack_elevation.html' with object=object.rack face='rear' extra_params=svg_extra %} +
+
+
+ {% endif %} {% plugin_right_page object %}