Просмотр исходного кода

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 лет назад
Родитель
Сommit
a2007a4728
1 измененных файлов с 1 добавлено и 1 удалено
  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'):
         if hasattr(instance, 'parent_object'):
             # Termination
             # Termination
-            return 'f0f0f0'
+            return getattr(instance, 'color', 'f0f0f0') or 'f0f0f0'
         if hasattr(instance, 'device_role'):
         if hasattr(instance, 'device_role'):
             # Device
             # Device
             return instance.device_role.color
             return instance.device_role.color