Przeglądaj źródła

Closes #10904: Added Colors to SVG for Front and Rear Ports (#10905)

* Added Colors to SVG for Front and Reaer Ports

Fix for feature request 10904 thanks to @TheZackCodec

* Simplify termination color resolution

Co-authored-by: jeremystretch <jstretch@ns1.com>
Derick Vigne 3 lat temu
rodzic
commit
a2007a4728
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      netbox/dcim/svg/cables.py

+ 1 - 1
netbox/dcim/svg/cables.py

@@ -166,7 +166,7 @@ class CableTraceSVG:
         """
         if hasattr(instance, 'parent_object'):
             # Termination
-            return 'f0f0f0'
+            return getattr(instance, 'color', 'f0f0f0') or 'f0f0f0'
         if hasattr(instance, 'device_role'):
             # Device
             return instance.device_role.color