diff --git a/netbox_topology_views/__init__.py b/netbox_topology_views/__init__.py index add42c1..2c02003 100644 --- a/netbox_topology_views/__init__.py +++ b/netbox_topology_views/__init__.py @@ -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.4' + version = '0.4.5' author = 'Mattijs Vanhaverbeke' author_email = 'author@example.com' base_url = 'topology-views' diff --git a/netbox_topology_views/api/views.py b/netbox_topology_views/api/views.py index b6dadbd..fc2a586 100644 --- a/netbox_topology_views/api/views.py +++ b/netbox_topology_views/api/views.py @@ -156,15 +156,18 @@ class SearchViewSet(GenericViewSet): if dev_name is None: dev_name = "device name unknown" - cable_role_name = device.device_type.display_name - if cable_role_name is None: - cable_role_name = "device role name unknown" - dev_title = "" + if device.device_role.name is not None: + node_content += "" if device.serial != "": - dev_title = dev_title + "" if device.primary_ip is not None: - dev_title = dev_title + "
Type:" + cable_role_name + "
Role:" + device.device_role.name + node_content = "" + + if device.device_type.display_name is not None: + node_content += "
Type: " + device.device_type.display_name + "
Role: " + device.device_role.name + "
Serial:" + device.serial + node_content += "
Serial: " + device.serial + "
IP Address:" + str(device.primary_ip.address) - dev_title = dev_title + "
" + node_content += "IP Address: " + str(device.primary_ip.address) + "" + + dev_title = " %s
" % (node_content) node = {} node["id"] = device.id diff --git a/package.json b/package.json index 7d32555..43ab527 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "netbox_topology_views", - "version": "0.4.4", + "version": "0.4.5", "scripts": { "resources": "gulp build", "resources_dev": "gulp build_dev" diff --git a/setup.py b/setup.py index fb2539b..ed8902b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( name='netbox-topology-views', - version='0.4.4', + version='0.4.5', description='An NetBox plugin to create Topology maps', url='https://github.com/mattieserver/netbox-topology-views', author='Mattijs Vanhaverbeke',