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
+1 -1
View File
@@ -4,7 +4,7 @@ class TopologyViewsConfig(PluginConfig):
name = 'netbox_topology_views'
verbose_name = 'Topology views'
description = 'An plugin to render toplogoy maps'
version = '0.4.2'
version = '0.4.3'
author = 'Mattijs Vanhaverbeke'
author_email = 'author@example.com'
base_url = 'topology-views'
+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"