diff --git a/README.md b/README.md index 8808a8a..b0c4b89 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,15 @@   -Create topology views/maps from your devices in netbox. -The connections are based on the cables you created in netbox. +Create topology views/maps from your devices in NetBox. +The connections are based on the cables you created in NetBox. Support to filter on name, site, tag and device role. Options to export to xml (for draw.io/diagrams.net) or png. ## Preview - + + ## Install @@ -56,21 +57,24 @@ python3 manage.py collectstatic --no-input | >= 2.10.0 | >= v0.5.0 | | < 2.10.0 | =< v0.4.10 | -### Custom field: coordinates +### Update -There is also support for custom fields. +Run `pip install netbox-topology-views --upgrade` in your venv. -If you create a custom field "coordinates" for "dcim > device" and "Circuits > circuit" with type "text" and name "coordinates" you will see the same layout every time. It is recommended to set this field to "UI visibility" "Hidden" and let the plugin manage it in the background. +Run `python3 manage.py migrate netbox_topology_views` -The coordinates are stored as: "X;Y". +Run `python3 manage.py collectstatic --no-input` -Please read the "Configure" chapter to set the `allow_coordinates_saving` option to True. -You might also set the `always_save_coordinates` option to True. +Clear you browser cache. ## Configure +### Individual Options + All individual options can be assigned a default value per user directly in the plugin. The default value can be overridden on the filter page. + + The remaining options must be configured in the `PLUGINS_CONFIG` section of your `netbox/configuration.py`. Example: @@ -87,12 +91,40 @@ PLUGINS_CONFIG = { | Setting | Default value | Description | | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | static_image_directory | netbox_topology_views/img | (str or pathlib.Path) Specifies the location that images will be loaded from by default. Must be within `STATIC_ROOT` | -| allow_coordinates_saving | False | (bool) Set to true if you use the custom coordinates fields and want to save the coordinates | -| always_save_coordinates | False | (bool) Set if you want to enable the option to save coordinates by default | +| allow_coordinates_saving | False | (bool) Set to true if you want to enable the ability to save the coordinates. | +| always_save_coordinates | False | (bool) Set if you want to enable the option to save coordinates by default. Setting allow_coordinates_saving to true is mandatory. | + +### Custom field: coordinates + +There is also support for custom fields. + +>**_Note:_** The custom field "coordinates" is deprecated and will be removed in the future. Please use Coordinate Groups instead. + +If you create a custom field "coordinates" for "dcim > device" and "Circuits > circuit" with type "text" and name "coordinates" you will see the same layout every time. It is recommended to set this field to "UI visibility" "Hidden" and let the plugin manage it in the background. + +The coordinates are stored as: "X;Y". + +> Please read the "Configure" chapter to set the `allow_coordinates_saving` option to True. +You might also set the `always_save_coordinates` option to True. + +### Convert custom field to Coordinate Groups + +Please note that values stored in the custom field "coordinates" are not being converted to Coordinate Groups automatically. A pragmatic way to do this conversion yourself is as follows: ++ Navigate to "Topology" > "Filters". ++ Select "Show Unconnected" and "Show Cables". ++ Leave all other filter settings alone. We want all entries to be displayed! ++ Click "Search" and wait for the results to be displayed ++ Select all nodes. This can be done by holding down the Shift key and dragging a frame around all icons with the left mouse button. ++ Drag the selection a tiny bit to the side. This causes all coordinates for all devices to be stored in the "default" group. +> **_Hint_**: Don't wait too long after clicking an icon in order to drag. If you hold the mouse button for too long before dragging starts, the selection is reset._ ++ Storing the values might take some time, depending on the number of devices. Please be patient and check "Coordinates" in order to make sure that everthing has been stored. ++ It is save to delete the custom field now. ### Custom Images -To change image with associated device use the `Images` page - it allows to map a device role with an image found in the netbox static directory (defined by the plugin config `static_image_directory` which defaults to `netbox_topology_views/img`). You can also upload you own custom images to there - these images will automatically be used for a device (if it does not already have a specified image in the settings) if their name is the device role slug. +To change image with associated device use the `Images` page - it allows to map a device role with an image found in the NetBox static directory (defined by the plugin config `static_image_directory` which defaults to `netbox_topology_views/img`). You can also upload you own custom images to there - these images will automatically be used for a device (if it does not already have a specified image in the settings) if their name is the device role slug. + + ## Use @@ -100,9 +132,11 @@ Go to the plugins tab in the navbar and click topology or go to `$NETBOX_URL/plu Select your options for the topology view: - +