mirror of
https://github.com/drygdryg/netbox-plugin-device-map.git
synced 2025-04-21 06:22:57 +03:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
03092bcf31 | ||
|
43d2e5d33e | ||
|
92642604fe | ||
|
494234b363 | ||
|
322c1e7cdd |
@ -5,6 +5,11 @@ A simple device map plugin with filtering criteria for NetBox
|
|||||||

|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
### Requirements
|
||||||
|
The plugin has been tested and confirmed works on NetBox versions from 3.2 to 3.5 and Python versions from 3.10 to 3.11.
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
1. If your NetBox installation uses virtualenv, activate it like this:
|
1. If your NetBox installation uses virtualenv, activate it like this:
|
||||||
```
|
```
|
||||||
source /opt/netbox/venv/bin/activate
|
source /opt/netbox/venv/bin/activate
|
||||||
@ -84,7 +89,7 @@ Custom tiles layer settings:
|
|||||||
| Setting | Example value | Description |
|
| Setting | Example value | Description |
|
||||||
|--------------|-----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|--------------|-----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| url_template | `https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png` | `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; a, b or c by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add "@2x" to the URL to load retina tiles. |
|
| url_template | `https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png` | `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; a, b or c by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add "@2x" to the URL to load retina tiles. |
|
||||||
| options | `{'subdomains' : ['a', 'b', 'c'], 'minZoom': 0, 'maxZoom': 18}` | [Leaflet TileLayer](https://leafletjs.com/SlavaUkraini/reference.html#tilelayer) options |
|
| options | `{'subdomains' : ['a', 'b', 'c'], 'minZoom': 0, 'maxZoom': 18}` | [Leaflet TileLayer](https://leafletjs.com/reference.html#tilelayer) options |
|
||||||
|
|
||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
- [Leaflet](https://leafletjs.com/)
|
- [Leaflet](https://leafletjs.com/)
|
||||||
|
@ -4,7 +4,7 @@ from extras.plugins import PluginConfig
|
|||||||
class DeviceMapConfig(PluginConfig):
|
class DeviceMapConfig(PluginConfig):
|
||||||
name = 'netbox_device_map'
|
name = 'netbox_device_map'
|
||||||
verbose_name = 'Device map'
|
verbose_name = 'Device map'
|
||||||
version = '0.1.2'
|
version = '0.1.3'
|
||||||
author = 'Victor Golovanenko'
|
author = 'Victor Golovanenko'
|
||||||
author_email = 'drygdryg2014@yandex.com'
|
author_email = 'drygdryg2014@yandex.com'
|
||||||
base_url = 'device-map'
|
base_url = 'device-map'
|
||||||
|
@ -2,7 +2,8 @@ from django import forms
|
|||||||
|
|
||||||
from dcim.models import DeviceRole, Device
|
from dcim.models import DeviceRole, Device
|
||||||
from ipam.models import VLANGroup, VLAN
|
from ipam.models import VLANGroup, VLAN
|
||||||
from utilities.forms import BootstrapMixin, DynamicModelChoiceField, DynamicModelMultipleChoiceField
|
from utilities.forms import BootstrapMixin
|
||||||
|
from utilities.forms.fields import DynamicModelChoiceField, DynamicModelMultipleChoiceField
|
||||||
|
|
||||||
|
|
||||||
class DeviceMapFilterForm(BootstrapMixin, forms.Form):
|
class DeviceMapFilterForm(BootstrapMixin, forms.Form):
|
||||||
|
2
setup.py
2
setup.py
@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
version = '0.1.2'
|
version = '0.1.3'
|
||||||
|
|
||||||
with open('README.md', encoding='utf-8') as f:
|
with open('README.md', encoding='utf-8') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user