This commit is contained in:
Mattijs Vanhaverbeke
2020-05-17 16:45:19 +02:00
parent 940b37428c
commit 85b27895e2
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -159,11 +159,11 @@ class SearchViewSet(GenericViewSet):
cable_role_name = device.device_type.display_name
if cable_role_name is None:
cable_role_name = "device role name unkown"
node = {}
node["id"] = device.id
node["name"] = dev_name
node["label"] = dev_name + " " + cable_role_name
node["label"] = dev_name + " {" + cable_role_name + "}"
node["shape"] = 'image'
if device.device_role.slug in settings.PLUGINS_CONFIG["netbox_topology_views"]["device_img"]:
node["image"] = '../../static/netbox_topology_views/img/' + device.device_role.slug + ".png"