File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ class NextBoxUIConfig(PluginConfig):
44 name = 'nextbox_ui_plugin'
55 verbose_name = 'NextBox UI'
66 description = 'A topology visualization plugin for Netbox powered by NextUI Toolkit.'
7- version = '0.6.7 '
7+ version = '0.6.8 '
88 author = 'Igor Korotchenkov'
99 author_email = 'iDebugAll@gmail.com'
1010 base_url = 'nextbox-ui'
Original file line number Diff line number Diff line change 55from dcim .models import Cable , Device , Interface
66from django .contrib .auth .mixins import PermissionRequiredMixin
77from django .conf import settings
8+ from packaging import version
89import json
910import re
1011
12+ NETBOX_CURRENT_VERSION = version .parse (settings .VERSION )
1113
1214# Default NeXt UI icons
1315SUPPORTED_ICONS = {
@@ -301,10 +303,18 @@ def get_site_topology(site_id):
301303 "srcIfName" : if_shortname (link .termination_a .name ),
302304 "tgtIfName" : if_shortname (link .termination_b .name )
303305 })
306+ if NETBOX_CURRENT_VERSION >= version .parse ("2.10.1" ):
307+ # Version 2.10.1 introduces some changes in cable trace behavior.
308+ if not isinstance (link .termination_a , Interface ):
309+ continue
304310 trace_result = link .termination_a .trace ()
305311 if not trace_result :
306312 continue
307- cable_path , * ignore = trace_result
313+ if NETBOX_CURRENT_VERSION >= version .parse ("2.10.1" ):
314+ # Version 2.10.1 introduces some changes in cable trace behavior.
315+ cable_path = trace_result
316+ else :
317+ cable_path , * ignore = trace_result
308318 # identify segmented cable paths between end-devices
309319 if len (cable_path ) < 2 :
310320 continue
Original file line number Diff line number Diff line change 77
88setup (
99 name = 'nextbox_ui_plugin' ,
10- version = '0.6.7 ' ,
10+ version = '0.6.8 ' ,
1111 url = 'https://github.com/iDebugAll/nextbox-ui-plugin' ,
12- download_url = 'https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.6.7 .tar.gz' ,
12+ download_url = 'https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.6.8 .tar.gz' ,
1313 description = 'A topology visualization plugin for Netbox powered by NextUI Toolkit.' ,
1414 long_description = long_description ,
1515 long_description_content_type = 'text/markdown' ,
You can’t perform that action at this time.
0 commit comments