added coords + bump version
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 topology maps'
|
||||
version = '0.5.3'
|
||||
version = '1.0.0-alpha.1'
|
||||
author = 'Mattijs Vanhaverbeke'
|
||||
author_email = 'author@example.com'
|
||||
base_url = 'netbox_topology_views'
|
||||
|
||||
@@ -8,7 +8,7 @@ menu_items = (
|
||||
buttons=(
|
||||
PluginMenuButton(
|
||||
link='plugins:netbox_topology_views:home',
|
||||
title='AS Numbers',
|
||||
title='Topology View',
|
||||
icon_class='mdi mdi-plus-thick',
|
||||
permissions=[],
|
||||
),
|
||||
|
||||
@@ -131,6 +131,14 @@ def get_topology_data(queryset):
|
||||
|
||||
if qs_device.device_role.color != "":
|
||||
node["color.border"] = "#" + qs_device.device_role.color
|
||||
|
||||
if "coordinates" in qs_device.custom_field_data:
|
||||
print(qs_device.custom_field_data)
|
||||
if qs_device.custom_field_data["coordinates"] is not None:
|
||||
cords = qs_device.custom_field_data["coordinates"].split(";")
|
||||
node["x"] = int(cords[0])
|
||||
node["y"] = int(cords[1])
|
||||
node["physics"] = False
|
||||
nodes.append(node)
|
||||
|
||||
results = {}
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "netbox_topology_views",
|
||||
"version": "0.5.3",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "netbox_topology_views",
|
||||
"version": "0.5.3",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"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.5.3',
|
||||
version='1.0.0-alpha.1',
|
||||
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