netbox-device-view 0.1.3__py3-none-any.whl → 0.1.4__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.
- netbox_device_view/utils.py +4 -0
- {netbox_device_view-0.1.3.dist-info → netbox_device_view-0.1.4.dist-info}/METADATA +2 -1
- {netbox_device_view-0.1.3.dist-info → netbox_device_view-0.1.4.dist-info}/RECORD +5 -5
- {netbox_device_view-0.1.3.dist-info → netbox_device_view-0.1.4.dist-info}/WHEEL +0 -0
- {netbox_device_view-0.1.3.dist-info → netbox_device_view-0.1.4.dist-info}/top_level.txt +0 -0
netbox_device_view/utils.py
CHANGED
|
@@ -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
|
+
Version: 0.1.4
|
|
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
|
|
|
@@ -6,7 +6,7 @@ netbox_device_view/navigation.py,sha256=FYzQyTOz8xzLs559KeI0nbY2nPlKipsfPeiV5y1n
|
|
|
6
6
|
netbox_device_view/tables.py,sha256=ejhKjD5fGo_tLUhTExqBhDL_TbYVe9TPnzF-ZWHqujY,351
|
|
7
7
|
netbox_device_view/template_content.py,sha256=gK7KNUcangjNl4janloXjGqs1jBSKllvYLhyf2_LaEA,1072
|
|
8
8
|
netbox_device_view/urls.py,sha256=UhLOmfj0v4ofRnHM-bxisTnIPQ2viS8I47AyHiA20LU,839
|
|
9
|
-
netbox_device_view/utils.py,sha256=
|
|
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.
|
|
21
|
-
netbox_device_view-0.1.
|
|
22
|
-
netbox_device_view-0.1.
|
|
23
|
-
netbox_device_view-0.1.
|
|
20
|
+
netbox_device_view-0.1.4.dist-info/METADATA,sha256=7V-rw6KG23oeodAYd_z02M7Z9VORPlL3-mXI4mk65U8,3753
|
|
21
|
+
netbox_device_view-0.1.4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
22
|
+
netbox_device_view-0.1.4.dist-info/top_level.txt,sha256=Cj7X6_XpLT0jnyTyX5DMqttqc8_z3uhRYCmvnXLfWOs,19
|
|
23
|
+
netbox_device_view-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|