Skip to content

Commit

Permalink
Make device name a link in a node tooltip (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
iDebugAll authored Feb 16, 2021
1 parent 2fc3f6c commit 21693e4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nextbox_ui_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class NextBoxUIConfig(PluginConfig):
name = 'nextbox_ui_plugin'
verbose_name = 'NextBox UI'
description = 'A topology visualization plugin for Netbox powered by NextUI Toolkit.'
version = '0.7.0'
version = '0.7.1'
author = 'Igor Korotchenkov'
author_email = 'iDebugAll@gmail.com'
base_url = 'nextbox-ui'
Expand Down
2 changes: 1 addition & 1 deletion nextbox_ui_plugin/static/nextbox_ui_plugin/next_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
content: [{
tag: 'a',
content: '{#node.model.name}',
props: {"href": "{#node.model.dcimDeviceLink}"}
props: {"href": "{#node.model.dcimDeviceLink}", "target": "_blank", "rel": "noopener noreferrer"}
}],
props: {
"style": "border-bottom: dotted 1px; font-size:90%; word-wrap:normal; color:#003688"
Expand Down
2 changes: 2 additions & 0 deletions nextbox_ui_plugin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def get_topology(nb_devices_qs):
device_ids = [d.id for d in nb_devices_qs]
for nb_device in nb_devices_qs:
device_is_passive = False
device_url = nb_device.get_absolute_url()
primary_ip = ''
if nb_device.primary_ip:
primary_ip = str(nb_device.primary_ip.address)
Expand All @@ -264,6 +265,7 @@ def get_topology(nb_devices_qs):
topology_dict['nodes'].append({
'id': nb_device.id,
'name': nb_device.name,
'dcimDeviceLink': device_url,
'primaryIP': primary_ip,
'serial_number': nb_device.serial,
'model': nb_device.device_type.model,
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

setup(
name='nextbox_ui_plugin',
version='0.7.0',
version='0.7.1',
url='https://github.com/iDebugAll/nextbox-ui-plugin',
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.7.0.tar.gz',
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.7.1.tar.gz',
description='A topology visualization plugin for Netbox powered by NextUI Toolkit.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 21693e4

Please sign in to comment.