netbox-device-view 0.1.3__tar.gz → 0.1.7__tar.gz

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.
Files changed (29) hide show
  1. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/PKG-INFO +2 -1
  2. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/README.md +1 -0
  3. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/__init__.py +1 -1
  4. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/navigation.py +2 -2
  5. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/template_content.py +1 -1
  6. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/utils.py +4 -0
  7. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view.egg-info/PKG-INFO +2 -1
  8. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/setup.py +1 -1
  9. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/MANIFEST.in +0 -0
  10. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/api/__init__.py +0 -0
  11. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/api/serializers.py +0 -0
  12. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/api/urls.py +0 -0
  13. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/api/views.py +0 -0
  14. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/filtersets.py +0 -0
  15. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/forms.py +0 -0
  16. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/migrations/0001_initial.py +0 -0
  17. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/migrations/__init__.py +0 -0
  18. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/models.py +0 -0
  19. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/static/netbox_device_view/css/device_view.css +0 -0
  20. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/tables.py +0 -0
  21. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/templates/netbox_device_view/deviceview.html +0 -0
  22. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/templates/netbox_device_view/ports.html +0 -0
  23. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/urls.py +0 -0
  24. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view/views.py +0 -0
  25. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view.egg-info/SOURCES.txt +0 -0
  26. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view.egg-info/dependency_links.txt +0 -0
  27. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view.egg-info/not-zip-safe +0 -0
  28. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/netbox_device_view.egg-info/top_level.txt +0 -0
  29. {netbox-device-view-0.1.3 → netbox_device_view-0.1.7}/setup.cfg +0 -0
@@ -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
 
@@ -48,6 +48,7 @@ You need to specify the grid-template-areas.
48
48
  - leading "empties" can be specified as x
49
49
  - trailing "empties" can be specified as z
50
50
  - between "empties" can be named s{0-99}
51
+ - numeric only ports have to be prefixed with "p" e.g. "p1"
51
52
 
52
53
  Example for Cisco C9300-24T with 8x 10G module ( more in [examples](https://github.com/peterbaumert/netbox-device-view/blob/main/examples/) folder )
53
54
 
@@ -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
 
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="netbox-device-view",
8
- version="0.1.3",
8
+ version="0.1.7",
9
9
  description="NetBox Device View plugin",
10
10
  packages=find_packages(),
11
11
  author="Peter Baumert",