Repository: netbox-community/netbox

Issue:
Devices on the elevations opposite side should be clickable
### NetBox version

v3.0.1

### Feature type

Change to existing functionality

### Proposed functionality

Currently in the "Elevations" view the devices that are assigned to the opposite side of the current view are shown in hatched red color. This is great, but the devices aren't currently clickable / links.
I do not see any reason why they wouldn't be clickable - it would save switching between front/back if the red hatched devices were clickable.

### Use case

Make the UX better and avoid unnecessary switches between front/back just to be able to click a device.

### Database changes

None.

### External dependencies

None.


Discussion:
IMO this can get confusing in very busy/disorganized racks. You're typically going to be looking at the front and rear faces side-by-side anyway.
> You're typically going to be looking at the front and rear faces side-by-side anyway.

This is true for the single rack view and there's no issue there I think. My OP was considering the "Elevations" that currently displays only one side.
I guess one other option could be in addition to "Front" and "Rear" buttons, there could be "Both" that displays rack fronts in the upper row and backs in the lower row; not side-by-side since all the racks are in the same row.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Not sure if I explained it well in the OP.
I meant devices at the opposite rack face that are "full depth" - the ones shown in red/with hatch in the U.
I did not mean the "not full depth" devices at the opposite rack face that are currently not drawn at all - making them visible & clickable would indeed make a mess I think.

An example/PoC of this is at https://github.com/bluikko/netbox/commit/b816ab611d6ca0b0b1d0ab246767f666b7b4c724
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
I hit this issue today and can take a look at it and the code already submitted by @bluikko, get it to work and submit a PR.

Resolving patch:
diff --git a/netbox/dcim/svg.py b/netbox/dcim/svg.py
--- a/netbox/dcim/svg.py
+++ b/netbox/dcim/svg.py
@@ -126,10 +126,16 @@ def _draw_device_front(self, drawing, device, start, end, text):
             link.add(drawing.text(str(name), insert=text, fill='white', class_='device-image-label'))
 
     def _draw_device_rear(self, drawing, device, start, end, text):
-        rect = drawing.rect(start, end, class_="slot blocked")
-        rect.set_desc(self._get_device_description(device))
-        drawing.add(rect)
-        drawing.add(drawing.text(get_device_name(device), insert=text))
+        link = drawing.add(
+            drawing.a(
+                href='{}{}'.format(self.base_url, reverse('dcim:device', kwargs={'pk': device.pk})),
+                target='_top',
+                fill='black'
+            )
+        )
+        link.set_desc(self._get_device_description(device))
+        link.add(drawing.rect(start, end, class_="slot blocked"))
+        link.add(drawing.text(get_device_name(device), insert=text))
 
         # Embed rear device type image if one exists
         if self.include_images and device.device_type.rear_image:


Test patch: