Skip to content

Commit

Permalink
Toposphere public (#150)
Browse files Browse the repository at this point in the history
What's new:

* topoSphere: a new topology visualization engine
* reworked filters
* dark mode detection
* main menu button
  • Loading branch information
iDebugAll authored Oct 26, 2024
1 parent c8369fa commit 20beb5d
Show file tree
Hide file tree
Showing 181 changed files with 1,379 additions and 173,711 deletions.
154 changes: 154 additions & 0 deletions LICENSE-topoSphere
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# topoSphere Software Development Kit Proprietary License Agreement

**Last Updated: October 25, 2024**

This **License Agreement** (the “Agreement”) is a legally binding agreement between you (either an individual or a legal entity) and **Igor Korotchenkov** (“Licensor”) governing the use of the **topoSphere Software Development Kit** (the “Software Development Kit” or “SDK”).

By installing, copying, or otherwise using the Software Development Kit, you agree to be bound by the terms of this Agreement. If you do not agree to these terms, do not install or use the Software Development Kit.

---

## Definitions

- **Licensor**: Igor Korotchenkov.
- **Licensee**: You (either an individual or a legal entity) obtaining the license.
- **Software Development Kit (SDK)**: The topoSphere Software Development Kit provided under this Agreement.
- **NextBox-UI-Plugin**: The specific plugin for NetBox with which the SDK is integrated.
- **Commercial Use**: Any use of the SDK as part of a paid product or service, integration into proprietary software, or any use intended for financial gain.
- **Non-Commercial Use**: Use by individuals or organizations without the intent of financial gain.
- **Personal Use**: Use by individuals for personal projects or learning.
- **Educational Use**: Use by educational institutions or for teaching purposes.

---

## 1. Grant of License

Licensor hereby grants you a limited, non-exclusive, non-transferable, revocable license to use the Software Development Kit solely as an integrated component of the **NextBox-UI-Plugin** for **NetBox**. This license is strictly limited to non-commercial, personal, or educational use, which includes:

- **Non-Commercial Use**: Use by individuals or organizations without the intent of financial gain.
- **Personal Use**: Use by individuals for personal projects or learning.
- **Educational Use**: Use by educational institutions or for teaching purposes.

Any other type of use requires prior written consent from Licensor.

---

## 2. Attribution

You must provide appropriate attribution to **Igor Korotchenkov** as the developer of the Software Development Kit. This attribution must be prominently included in the documentation, the About section, or any other visible part of any instance of the Software Development Kit in use, stating:

“Powered by topoSphere.”

The attribution should be clear and not obscured by other text or graphics.

---

## 3. Restrictions

You may not:

### a. No Derivatives

Modify, adapt, translate, reverse engineer, decompile, disassemble, or create derivative works based on the Software Development Kit, in whole or in part.

### b. No Commercial Use

Use the Software Development Kit for any commercial purpose without obtaining an additional commercial license from Licensor. Commercial use includes, but is not limited to:

- Incorporating the SDK into a paid product or service.
- Using the SDK within proprietary software that is sold or distributed for profit.
- Leveraging the SDK to provide paid consultancy or development services.

### c. Usage Limitation

Use the Software Development Kit as an independent component or as part of any other software, product, or platform outside of the **NextBox-UI-Plugin** for **NetBox** without prior written consent from Licensor.

---

## 4. Ownership

The Software Development Kit is licensed, not sold. All title, rights, and ownership in and to the Software Development Kit, including any intellectual property rights, remain exclusively with **Igor Korotchenkov**. This Agreement does not grant you any ownership rights in the Software Development Kit, and no rights are granted by implication, estoppel, or otherwise.

---

## 5. Termination

This license is effective until terminated. Licensor may terminate this Agreement immediately upon written notice if you breach any of the terms of this Agreement. Upon termination, you must immediately cease all use of the Software Development Kit and destroy all copies, in whole or in part, of the Software Development Kit in your possession or control. This includes, but is not limited to, any backups or derivatives.

### Survival

Sections **6 (Disclaimer of Warranty)**, **7 (Limitation of Liability)**, **4 (Ownership)**, **8 (Governing Law)**, **9 (Indemnification)**, **10 (Entire Agreement)**, **11 (Severability)**, **12 (Assignment)**, **13 (No Waiver)**, and **14 (Amendments)** shall survive termination of this Agreement.

---

## 6. Disclaimer of Warranty

THE SOFTWARE DEVELOPMENT KIT IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. LICENSOR DOES NOT WARRANT THAT THE SOFTWARE DEVELOPMENT KIT WILL MEET YOUR REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED, ERROR-FREE, OR FREE FROM HARMFUL COMPONENTS.

---

## 7. Limitation of Liability

IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY DAMAGES (INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE DEVELOPMENT KIT, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

### Cap on Liability

IN NO EVENT SHALL LICENSOR'S TOTAL LIABILITY FOR ALL CLAIMS RELATED TO THIS AGREEMENT EXCEED THE AMOUNT PAID BY LICENSEE FOR THE SOFTWARE DEVELOPMENT KIT.

---

## 8. Governing Law

This Agreement shall be governed by and construed in accordance with the laws of **Dubai, United Arab Emirates**, without regard to its conflict of laws principles. Any disputes arising out of or in connection with this Agreement shall be subject to the exclusive jurisdiction of the courts located in Dubai, UAE.

---

## 9. Indemnification

You agree to indemnify, defend, and hold harmless **Igor Korotchenkov** and his agents from and against any and all claims, damages, obligations, losses, liabilities, costs, or debt, and expenses (including but not limited to attorney's fees) arising from:

- Your use of and access to the Software Development Kit.
- Your violation of any term of this Agreement.
- Your violation of any third-party right, including without limitation any copyright, property, or privacy right.

---

## 10. Entire Agreement

This Agreement constitutes the entire agreement between you and **Igor Korotchenkov** regarding the use of the Software Development Kit and supersedes all prior or contemporaneous understandings, agreements, representations, and warranties, whether written or oral, regarding such subject matter.

---

## 11. Severability

If any provision of this Agreement is found to be unenforceable or invalid under any applicable law, such unenforceability or invalidity shall not render this Agreement unenforceable or invalid as a whole. Such provisions shall be deleted without affecting the remaining provisions herein.

---

## 12. Assignment

You may not assign, transfer, sublicense, or otherwise delegate any rights or obligations under this Agreement without the prior written consent of **Igor Korotchenkov**. Any attempt to do so without such consent is void and will automatically terminate this Agreement.

---

## 13. No Waiver

No waiver of any term of this Agreement shall be deemed a further or continuing waiver of such term or any other term, and Licensor’s failure to assert any right or provision under this Agreement shall not constitute a waiver of such right or provision.

---

## 14. Amendments

Licensor reserves the right to amend this Agreement at any time by publishing a new version of the Agreement at [https://toposphere.net/nextbox/license](https://toposphere.net/nextbox/license). Continued use of the Software Development Kit after any such amendments constitutes acceptance of the new terms.

---

## Acknowledgment

By installing or using the Software Development Kit, you acknowledge that you have read this Agreement, understand it, and agree to be bound by its terms and conditions.

---

**Igor Korotchenkov**
**Email:** iDebugAll@gmail.com
**Website:** [https://toposphere.net](https://toposphere.net)
114 changes: 23 additions & 91 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# NextBox UI Plugin

A topology visualization plugin for [NetBox](https://github.com/netbox-community/netbox) powered by [NextUI](https://developer.cisco.com/site/neXt/) Toolkit. Netbox v2.8.0+ is required.
NextBox UI is a Next Generation topology visualization plugin for [NetBox](https://github.com/netbox-community/netbox) powered by topoSphere SDK.<br/>

The Plugin delivers adaptive and scalable network topology maps, featuring advanced auto-layout algorithms, extended Filters, and multiple export options. Designed for efficiency and flexibility, NextBox UI enhances the visualization and management of complex network infrastructures within NetBox, providing users with intuitive tools to customize views, streamline network planning, and facilitate comprehensive data analysis.

![](samples/topology_viewer_light_mode.png)
*Now with Dark Mode!*
![](samples/topology_viewer_dark_mode.png)

# Compatibility

Newest NextBox UI Plugin versions 1.X support NetBox 4.1.<br/>

Legacy NextBox UI Plugin version 0.15 support NetBox 3.5-4.1.

# Installation

Expand Down Expand Up @@ -54,34 +66,7 @@ Optionally, update a PLUGINS_CONFIG parameter in **configuration.py** to rewrite
# ADD YOUR SETTINGS HERE
# icon_role_map is a dict
# }
# 'undisplayed_device_role_slugs': (
# # ADD YOUR SETTINGS HERE
# undisplayed_device_role_slugs value is a list or a tuple
# Listed device role slugs are hidden on initial view load,
# you may then hide/display any layer with a control button.
# ),
# 'undisplayed_device_tags': (
# ADD YOUR SETTINGS HERE
# undisplayed_device_tags value is a list or a tuple of regex strings.
# Devices with tags matching any of listed regular expressions are hidden
# on initial view load, you may then hide/display any layer with a control button.
# ),
# 'select_layers_list_include_device_tags': (
# ADD YOUR SETTINGS HERE
# select_layers_list_include_device_tags value is a list or a tuple of regex strings.
# Use this parameter to control tags listed in Select Layers menu.
# If specified, it works as allow list.
# ),
# 'select_layers_list_exclude_device_tags': (
# ADD YOUR SETTINGS HERE
# select_layers_list_exclude_device_tags value is a list or a tuple of regex strings.
# Use this parameter to control tags listed in Select Layers menu.
# If specified, it filters out matched tags from the list, except ones mathcing 'undisplayed_device_tags'.
# ),
# 'DISPLAY_PASSIVE_DEVICES': True|False,
# 'DISPLAY_LOGICAL_MULTICABLE_LINKS': True|False,
# 'DISPLAY_UNCONNECTED': True|False,
# 'INITIAL_LAYOUT': 'vertical'|'horizontal'|'auto'
# 'INITIAL_LAYOUT': 'auto' # or 'layered'
# }
#}
```
Expand Down Expand Up @@ -180,29 +165,12 @@ Default mapping already contains some general categories:
}
```

4. Default value is 'unknown' (renders as a question mark icon).
4. Default value is 'unknown'.
<br/><br/>

The Plugin can control the visibility of the layers and/or specific nodes on the topology view.<br/>
The visibility control is currently implemented for specific device roles, device tags, unconnected devices, and passive devices:<br/>

- Initial visibility behavior for specific device roles is controlled by 'undisplayed_device_role_slugs' plugin parameter. Listed device role slugs are hidden on initial view load, you may then hide/display any layer with a control button on the topology view page.<br/>

- Initial visibility behavior for specific device tags is controlled by 'undisplayed_device_tags' plugin parameter. Devices with tags matching listed tag regular expressions are hidden on initial view load, you may then hide/display any layer with a control button on the topology view page.<br/>
By default, the plugin lists all discovered device tags in Select Layers menu. You can use 'select_layers_list_include_device_tags' and 'select_layers_list_exclude_device_tags' plugin parameters to filter the included tags.<br/>
All three tag visibility control parameters are optional lists of regular expressions. Tags matching 'undisplayed_device_tags' are always listed in Select Layers menu. Empty or unset 'select_layers_list_include_device_tags' allows all discovered tags to be listed in Select layers menu. If set, 'select_layers_list_include_device_tags' works as an allow list for matched tags. 'select_layers_list_exclude_device_tags' filters out matched tags from the list, excpept for ones matching 'undisplayed_device_tags'.

- Initial visibility behavior for unconnected nodes is controlled by DISPLAY_UNCONNECTED boolean plugin parameter.<br/>
By default, unconnected nodes are being displayed. Set DISPLAY_UNCONNECTED to False to hide them on initial topology view load.<br/>
A separate 'Hide/Display Unconnected' button may then be used to hide or display those nodes.

- Initial visibility for passive devices (patch panels, PDUs) is controlled by DISPLAY_PASSIVE_DEVICES boolean plugin parameter. A device is considered passive if it has cables connected to Front and Rear Ports only and not to Interfaces.<br/>Passive devices are hidden by default. You can display them with 'Display Passive Devices' button on the topology view page. <br/>
Actual multi-cable connections between the end-devices a replaced by the direct logical connection once the passive devices are hidden. This logical direct link may be displayed regardless of the passive device visibility in addition to the cabling across patch panels if you set DISPLAY_LOGICAL_MULTICABLE_LINKS plugin parameter to True. DISPLAY_LOGICAL_MULTICABLE_LINKS is set to False by default. This parameter only affects the initial logical link visibility. With hidden passive devices, it is always being displayed.<br/>
<br/>

Device layers are ordered automatically by default. You can control this behavior with INITIAL_LAYOUT plugin parameter. Valid options are 'vertical', 'horizontal', and 'auto'.<br/>
'auto' layout relies on NeXt UI dataprocessor best-effort algorithms. It spreads the Nodes across the view so they would be as distant from each other as possible. You may use it if the vertical and horizontal initial layout does not work properly in your browser (this is the issue to be fixed).

Device layers are ordered automatically by default. You can control this behavior with INITIAL_LAYOUT plugin parameter. Valid options are 'layered', and 'auto'.<br/>
'auto' layout relies on topoSphere best-effort algorithms. It spreads the Nodes across the view so they would be as distant from each other as possible.


### Collect Static Files
Expand All @@ -212,15 +180,6 @@ The Plugin contains static files for topology visualization. They should be serv
(venv) $ python3 manage.py collectstatic
```

### Apply Database Migrations

> For plugin version 0.8.0 and above.
Apply database migrations with Django `manage.py`:
```
(venv) $ python3 manage.py migrate
```

### Restart Netbox
Restart the WSGI service to apply changes:
```
Expand Down Expand Up @@ -262,43 +221,16 @@ If you are experiencing some unexpected errors or visual behaviors after the ins

# Usage

Once installed and initialized, the Plugin runs on a backend.<br/>
The Plugin supports a topology visualization of arbitrary sets of Sites and Regions.<br/>
<br/>
You can access Topology visualizations in different ways:
1. By clicking a custom plugin Topology button on a Site page.
![](samples/sample_topology_button.png)
The Site topology visualization will open in a pop-up window:
![](samples/sample_topology_view.png)<br/>
Nodes are draggable and clickable:
![](samples/sample_node_tooltip_content.png)<br/>
You can switch between vertical and horizontal layers sort order back and forth. Default is vertical.<br/>

2. Using Plugins dropdown menu item: *Plugins -> NextBox UI -> Topology Viewer*.<br/>
Use Search form controls to pick desired Sites, Regions, or Devices.<br/>
![](samples/sample_topology_viewer_page01.png)
<br/>

### Visibility control

You can display or hide any specific device roles on the topology view with 'Select Layer' button:
![](samples/sample_layer_visibility.png)<br/>
The list of available device roles is generated automatically based on discovered devices for a visualized site.<br/>
<br/>
'Display/Hide Unconnected' button hides or displays the devices with no links attached.<br/>
<br/>
'Display/Hide Passive Devices' buttons hides or displays the passive devices (patch pannels, PDUs, etc).<br/>
<br/>
In a samples below, edge-sw01 is connected with core-rtr01 and core-rtr02 through Patch Panel A and Patch Panel B with multiple cable hops:<br/>
![](samples/sample_patch_panels.png)<br/>
Once you hide the passive devices (default state), a logical direct link shows up between the edge switch and the core routers:<br/>
![](samples/sample_hide_passive.png)<br/>
If DISPLAY_LOGICAL_MULTICABLE_LINKS is set to True (default is False) this logical link is displayed initially:<br/>
![](samples/sample_display_logical_link.png)
Once installed and initialized, the Plugin will be available via Topology Viewer main menu item in NetBox.


### Required Netbox User Permissions
The Plugin requires the following user permissions to access the topology view:

- dcim | site | Can read site
- dcim | device | Can view device
- dcim | cable | Can view cable

# Licensing

Plugin code is published under MIT license. Embedded topoSphere SDK bundle is published under proprietary license special for NextBox UI Plugin and NetBox Community free of charge.
5 changes: 3 additions & 2 deletions nextbox_ui_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
class NextBoxUIConfig(PluginConfig):
name = 'nextbox_ui_plugin'
verbose_name = 'NextBox UI'
description = 'A topology visualization plugin for Netbox powered by NextUI Toolkit.'
version = '0.15.0'
description = 'Next-Gen topology visualization plugin for Netbox powered by topoSphere SDK.'
version = '1.0.0'
author = 'Igor Korotchenkov'
author_email = 'iDebugAll@gmail.com'
base_url = 'nextbox-ui'
min_version = "4.1.0"
required_settings = []
default_settings = {}
caching_config = {
Expand Down
2 changes: 0 additions & 2 deletions nextbox_ui_plugin/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
router = DefaultRouter()
router.APIRootView = views.NextBoxUIPluginRootView

router.register(r'savedtopologies', views.SavedTopologyViewSet)

app_name = "nextbox_ui_plugin-api"
urlpatterns = router.urls
4 changes: 0 additions & 4 deletions nextbox_ui_plugin/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ class NextBoxUIPluginRootView(APIRootView):
def get_view_name(self):
return 'NextBoxUI'


class SavedTopologyViewSet(ModelViewSet):
queryset = SavedTopology.objects.all()
serializer_class = serializers.SavedTopologySerializer
Loading

0 comments on commit 20beb5d

Please sign in to comment.