small cleanup and v0.4.5
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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 = "<table><tr><th>Type:</th><td>" + cable_role_name + "</td></tr><tr><th>Role:</th><td>" + device.device_role.name
|
||||
node_content = ""
|
||||
|
||||
if device.device_type.display_name is not None:
|
||||
node_content += "<tr><th>Type: </th><td>" + device.device_type.display_name + "</td></tr>"
|
||||
if device.device_role.name is not None:
|
||||
node_content += "<tr><th>Role: </th><td>" + device.device_role.name + "</td></tr>"
|
||||
if device.serial != "":
|
||||
dev_title = dev_title + "</td></tr><tr><th>Serial:</th><td>" + device.serial
|
||||
node_content += "<tr><th>Serial: </th><td>" + device.serial + "</td></tr>"
|
||||
if device.primary_ip is not None:
|
||||
dev_title = dev_title + "</td></tr><tr><th>IP Address:</th><td>" + str(device.primary_ip.address)
|
||||
dev_title = dev_title + "</td></tr></table>"
|
||||
node_content += "<tr><th>IP Address: </th><td>" + str(device.primary_ip.address) + "</td></tr>"
|
||||
|
||||
dev_title = "<table> %s </table>" % (node_content)
|
||||
|
||||
node = {}
|
||||
node["id"] = device.id
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user