Skip to main content

A simple circuit map with filter criteria

Project description

NetBox circuit map

A simple circuit map plugin with filtering criteria for NetBox

Installation

Requirements

The plugin has been tested and confirmed works on NetBox versions from 3.5.7 and Python version 3.10.

Steps

  1. If your NetBox installation uses virtualenv, activate it like this:
source /opt/netbox/venv/bin/activate
  1. Install the plugin.

To ensure plugin is automatically re-installed during future NetBox upgrades, create a file named local_requirements.txt (if not already existing) in the NetBox root directory and list the nextbox-plugin-circuit-map package:

  • Option A: if you want to install it from PyPI:
echo netbox-plugin-circuit-map | sudo tee -a /opt/netbox/local_requirements.txt
  • Option B: if you manually downloaded the plugin distribution from releases:
echo "/path/to/netbox-plugin-circuit-map.tar.gz" | sudo tee -a /opt/netbox/local_requirements.txt

Then run:

sudo pip install -U -r /opt/netbox/local_requirements.txt

to install the plugin.

  1. Collect static files:
sudo python /opt/netbox/netbox/manage.py collectstatic
  1. To enable plugin, add the plugin's name to the PLUGINS list in configuration.py (it's usually located in /opt/netbox/netbox/netbox/) like so:
PLUGINS = [
    'netbox_circuit_map'
]
  1. Restart NetBox WSGI service to apply changes:
sudo systemctl restart netbox

Configuration

You can customize plugin behavior according to your needs. For example, install custom map tiles. Update PLUGINS_CONFIG parameter in the configuration.py like this:

PLUGINS_CONFIG = {
    'netbox_circuit_map': {
        'geomap_settings': {
            'attribution': '<a href="https://osm.yourdomain.net">Your company</a> | © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
            'tiles': {
                'url_template': 'https://osm.yourdomain.net/hot/{z}/{x}/{y}.png',
                'options': {
                    'maxZoom': 19
                }
            }
        }
    }
}

Settings

Setting Default value Description
geomap_settings Geographical map settings

Geographical map settings

Setting Default value Description
attribution Data by &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> Attribution text in the lower right corner of the map
crs EPSG3857 Coordinate reference system
tiles Tiles layer settings

Custom tiles layer settings:

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.
options {'subdomains' : ['a', 'b', 'c'], 'minZoom': 0, 'maxZoom': 18} Leaflet TileLayer options

Acknowledgements

Leaflet plugins

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox-plugin-circuit-map-0.0.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_plugin_circuit_map-0.0.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file netbox-plugin-circuit-map-0.0.1.tar.gz.

File metadata

File hashes

Hashes for netbox-plugin-circuit-map-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c3c24be370969d4a52e52b7dac8f4068b374a88dad3e4334750a84f576b810a9
MD5 2add955c5948171071347a72d4e069f9
BLAKE2b-256 7f0e5b90005d477df0e79e5ec716ef058a76bfa6e0b65d210616ca752c955ddb

See more details on using hashes here.

File details

Details for the file netbox_plugin_circuit_map-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_plugin_circuit_map-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 593c42ae492371310293e47125f380f5997ec4b26864b7b76902c254bd597ced
MD5 92cb5452f6cfde732bf9ff9d45d0710b
BLAKE2b-256 998b02709b84c803425c63309d2ed5ad52373974a03d6d787bde8e4bc83431e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page