Răsfoiți Sursa

Closes #6278: Note device locations on cable traces

jeremystretch 4 ani în urmă
părinte
comite
87b4cfff1a

+ 1 - 0
docs/release-notes/version-2.11.md

@@ -5,6 +5,7 @@
 ### Enhancements
 
 * [#6275](https://github.com/netbox-community/netbox/issues/6275) - Linkify rack, device counts on locations list
+* [#6278](https://github.com/netbox-community/netbox/issues/6278) - Note device locations on cable traces
 
 ### Bug Fixes
 

+ 3 - 0
netbox/templates/dcim/trace/device.html

@@ -2,6 +2,9 @@
     <strong><a href="{{ device.get_absolute_url }}">{{ device }}</a></strong><br />
     {{ device.device_type.manufacturer }} {{ device.device_type }}<br />
     <a href="{{ device.site.get_absolute_url }}">{{ device.site }}</a>
+    {% if device.location %}
+        / <a href="{{ device.location.get_absolute_url }}">{{ device.location }}</a>
+    {% endif %}
     {% if device.rack %}
         / <a href="{{ device.rack.get_absolute_url }}">{{ device.rack }}</a>
     {% endif %}