diff --git a/docs/release-notes/version-3.2.md b/docs/release-notes/version-3.2.md index 93021320f..e69843198 100644 --- a/docs/release-notes/version-3.2.md +++ b/docs/release-notes/version-3.2.md @@ -18,6 +18,7 @@ * [#9484](https://github.com/netbox-community/netbox/issues/9484) - Include services listening on "all IPs" under IP address view * [#9486](https://github.com/netbox-community/netbox/issues/9486) - Fix redirect URL when adding device components from the module view * [#9495](https://github.com/netbox-community/netbox/issues/9495) - Correct link to contacts in contact groups table column +* [#9503](https://github.com/netbox-community/netbox/issues/9503) - Hyperlinks in ack elevation SVGs must always use absolute URLs * [#9512](https://github.com/netbox-community/netbox/issues/9512) - Fix duplicate site results when searching by ASN * [#9524](https://github.com/netbox-community/netbox/issues/9524) - Correct order of VLAN fields under VM interface creation form * [#9537](https://github.com/netbox-community/netbox/issues/9537) - Ensure consistent use of placeholder tag throughout UI diff --git a/netbox/dcim/svg.py b/netbox/dcim/svg.py index 7cd0fa417..1de68ec36 100644 --- a/netbox/dcim/svg.py +++ b/netbox/dcim/svg.py @@ -114,7 +114,7 @@ class RackElevationSVG: # Embed front device type image if one exists if self.include_images and device.device_type.front_image: image = drawing.image( - href=device.device_type.front_image.url, + href='{}{}'.format(self.base_url, device.device_type.front_image.url), insert=start, size=end, class_='device-image' @@ -140,7 +140,7 @@ class RackElevationSVG: # Embed rear device type image if one exists if self.include_images and device.device_type.rear_image: image = drawing.image( - href=device.device_type.rear_image.url, + href='{}{}'.format(self.base_url, device.device_type.rear_image.url), insert=start, size=end, class_='device-image' @@ -151,9 +151,9 @@ class RackElevationSVG: stroke_width='0.2em', stroke_linejoin='round', class_='device-image-label')) link.add(drawing.text(get_device_name(device), insert=text, fill='white', class_='device-image-label')) - @staticmethod - def _draw_empty(drawing, rack, start, end, text, id_, face_id, class_, reservation): - link_url = '{}?{}'.format( + def _draw_empty(self, drawing, rack, start, end, text, id_, face_id, class_, reservation): + link_url = '{}{}?{}'.format( + self.base_url, reverse('dcim:device_add'), urlencode({ 'site': rack.site.pk,