netbox-device-view 0.1.3__py3-none-any.whl → 0.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- from extras.plugins import PluginConfig
1
+ from netbox.plugins import PluginConfig
2
2
  from importlib.metadata import metadata
3
3
 
4
4
  metadata = metadata("netbox_device_view")
@@ -1,5 +1,5 @@
1
- from extras.plugins import PluginMenuButton, PluginMenuItem
2
- from utilities.choices import ButtonColorChoices
1
+ from netbox.plugins import PluginMenuButton, PluginMenuItem
2
+ from netbox.choices import ButtonColorChoices
3
3
 
4
4
  deviceview_buttons = [
5
5
  PluginMenuButton(
@@ -1,4 +1,4 @@
1
- from extras.plugins import PluginTemplateExtension
1
+ from netbox.plugins import PluginTemplateExtension
2
2
  from .utils import prepare
3
3
  from django.conf import settings
4
4
 
@@ -21,6 +21,8 @@ def process_interfaces(interfaces, ports_chassis, dev):
21
21
  )
22
22
  else:
23
23
  itf.stylename = re.sub(r"[^.a-zA-Z\d]", "-", itf.name.lower())
24
+ if itf.stylename.isdigit():
25
+ itf.stylename = f"p{itf.stylename}"
24
26
  if dev not in ports_chassis:
25
27
  ports_chassis[dev] = []
26
28
  ports_chassis[dev].append(itf)
@@ -34,6 +36,8 @@ def process_ports(ports, ports_chassis, dev):
34
36
  continue
35
37
  port.is_port = True
36
38
  port.stylename = re.sub(r"[^.a-zA-Z\d]", "-", port.name.lower())
39
+ if port.stylename.isdigit():
40
+ port.stylename = f"p{port.stylename}"
37
41
  if dev not in ports_chassis:
38
42
  ports_chassis[dev] = []
39
43
  ports_chassis[dev].append(port)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-device-view
3
- Version: 0.1.3
3
+ Version: 0.1.7
4
4
  Summary: NetBox Device View plugin
5
5
  Home-page: https://github.com/peterbaumert/netbox-device-view
6
6
  Author: Peter Baumert
@@ -59,6 +59,7 @@ You need to specify the grid-template-areas.
59
59
  - leading "empties" can be specified as x
60
60
  - trailing "empties" can be specified as z
61
61
  - between "empties" can be named s{0-99}
62
+ - numeric only ports have to be prefixed with "p" e.g. "p1"
62
63
 
63
64
  Example for Cisco C9300-24T with 8x 10G module ( more in [examples](https://github.com/peterbaumert/netbox-device-view/blob/main/examples/) folder )
64
65
 
@@ -1,12 +1,12 @@
1
- netbox_device_view/__init__.py,sha256=-7OOB2G1IktHFYxjsou5SjM1h8eVNCju52MkWs1Jva4,532
1
+ netbox_device_view/__init__.py,sha256=UEs107Oqb9efDbmxnfheCTQFuaukXQgICuwW3qtJi08,532
2
2
  netbox_device_view/filtersets.py,sha256=kCPEIzue5bOeyFK_Aqhpi1VQ_YQvqyDBd4dvP2UqVAU,215
3
3
  netbox_device_view/forms.py,sha256=rr9gVDDbP_DSQP0oOTVPWjd4Mti87tcOLDf742-y6qQ,211
4
4
  netbox_device_view/models.py,sha256=MN6eThuBJ1bm-vsQF1zM6He5cgKpMfZeCBqHmAjuHTA,500
5
- netbox_device_view/navigation.py,sha256=FYzQyTOz8xzLs559KeI0nbY2nPlKipsfPeiV5y1npUI,497
5
+ netbox_device_view/navigation.py,sha256=VU3N-Z9xIgxtlkvcdPJym8R4rDtcJBr_Axjlk39V_os,494
6
6
  netbox_device_view/tables.py,sha256=ejhKjD5fGo_tLUhTExqBhDL_TbYVe9TPnzF-ZWHqujY,351
7
- netbox_device_view/template_content.py,sha256=gK7KNUcangjNl4janloXjGqs1jBSKllvYLhyf2_LaEA,1072
7
+ netbox_device_view/template_content.py,sha256=4B_aiNS6ARoAv97-I6M1-2fCSIc3UcBW0tuRhy0sDZU,1072
8
8
  netbox_device_view/urls.py,sha256=UhLOmfj0v4ofRnHM-bxisTnIPQ2viS8I47AyHiA20LU,839
9
- netbox_device_view/utils.py,sha256=XP4VguEXzmbkDVS7P7BWmwHbR-cLtRMczFvOzXcCVfs,3004
9
+ netbox_device_view/utils.py,sha256=uUPJnwYfEpM6H61Z-BkyNeQwmWm3xJY5Z9-Xe9Jp7f8,3191
10
10
  netbox_device_view/views.py,sha256=8OQQE-BZPM_ZXXopiRGJStdXq6eAE_tndfRVvHLkA2U,1778
11
11
  netbox_device_view/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  netbox_device_view/api/serializers.py,sha256=IQEFuIh7X22MWO4jxv4MctZQxln-DgH2eo-0IbdvBl4,456
@@ -17,7 +17,7 @@ netbox_device_view/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
17
17
  netbox_device_view/static/netbox_device_view/css/device_view.css,sha256=VnvjTMPrEnUkpb_odDe6-VJKhBXZ6RuII4Ce3EnPDCc,833
18
18
  netbox_device_view/templates/netbox_device_view/deviceview.html,sha256=iYfqjTO_tvp0c7_0s7AxKmzHC_6JRxxbRahPxoTi3NQ,2893
19
19
  netbox_device_view/templates/netbox_device_view/ports.html,sha256=H-OVDZfpa-s3NB5a3ZJmrNbir001wfYfKJss8bppBgk,1716
20
- netbox_device_view-0.1.3.dist-info/METADATA,sha256=gerVnUb_YMrqyH7Am6d6AoQnUmPx1ZBV8cOgRKio32I,3693
21
- netbox_device_view-0.1.3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
22
- netbox_device_view-0.1.3.dist-info/top_level.txt,sha256=Cj7X6_XpLT0jnyTyX5DMqttqc8_z3uhRYCmvnXLfWOs,19
23
- netbox_device_view-0.1.3.dist-info/RECORD,,
20
+ netbox_device_view-0.1.7.dist-info/METADATA,sha256=LkaZ65ldo2ebstj8kJ2qKIfCk-ELTkZqFl_20fUBf_c,3753
21
+ netbox_device_view-0.1.7.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
22
+ netbox_device_view-0.1.7.dist-info/top_level.txt,sha256=Cj7X6_XpLT0jnyTyX5DMqttqc8_z3uhRYCmvnXLfWOs,19
23
+ netbox_device_view-0.1.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: setuptools (74.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5