Comments (10)
Hi,
could you please elaborate the expected tag assignment and handling in some more details?
The ability to hide specific layers is already implemented in general.
You can use "undisplayed_device_role_slugs" plugin parameter to make listed device roles hidden on the initial site topology:
PLUGINS_CONFIG = {
"nextbox_ui_plugin": {
"undisplayed_device_role_slugs": (
"edge-switch",
"border-router",
)
}
}
In the example above, any devices with 'edge-switch' or 'border-router' role assigned will be initially hidden.
Such device roles will be unchecked in the 'Select Layers' menu on the topology view.
You can use this menu to dynamically control the visibility of the layers:
How do you suggest to improve or extend this logic?
from nextbox-ui-plugin.
Hi,
could you please elaborate the expected tag assignment and handling in some more details?
The ability to hide specific layers is already implemented in general.
You can use "undisplayed_device_role_slugs" plugin parameter to make listed device roles hidden on the initial site topology:PLUGINS_CONFIG = { "nextbox_ui_plugin": { "undisplayed_device_role_slugs": ( "edge-switch", "border-router", ) } }
In the example above, any devices with 'edge-switch' or 'border-router' role assigned will be initially hidden.
Such device roles will be unchecked in the 'Select Layers' menu on the topology view.
You can use this menu to dynamically control the visibility of the layers:
How do you suggest to improve or extend this logic?
@iDebugAll, I could suggest that it would be great if we could make such dynamic filtering based on ... Tags for example. Because we have a big topology with switches with the same role, but I would like to see only those switches, which refer to particular Dev environment or lab. Suppose, we have 100 switches in one site and 5 environments with 20 devices in each environment. It would be great if we had a chance to see only devices from one environment.
from nextbox-ui-plugin.
@iDebugAll additionally, is it possible to increase topology window to "full view"?)
from nextbox-ui-plugin.
@Vadims06 explained it better than I did but that's the idea. If you want to only draw let's say a particular tag that belongs to a particular customer or environment. It would be awesome to be able to that from the web ui dynamically.
from nextbox-ui-plugin.
@Vadims06 @jpobeda thank you for the clarification. Such visibility granularity sounds reasonable and aligned with current plugin design.
I have just made a first approach to an implementation. In my lab, it looks as follows:
Some tag filtering should still be added as not all the tags conform this idea by design. I'm thinking of an approach like that:
PLUGINS_CONFIG = {
"nextbox_ui_plugin": {
"undisplayed_device_tags": (
"tag_to_hide_some_devices_initially",
"another_tag_to_hide_some_devices_initially",
),
"select_layers_list_include_device_tags": (
# include only tags containing listed words to a 'Select Layers' list
"lab",
"group",
),
"select_layers_list_exclude_device_tags": (
# filter out tags containing listed words from a 'Select Layers' list
"foo",
"bar",
),
}
}
This should cover most of the cases.
Could you provide some insight on how you use tags in your environment? It could be helpful.
from nextbox-ui-plugin.
Hi @iDebugAll ,
It looks promising. Thanks for taking the time to look into it.
The main reason to be using tags is to be able to create filters easily from retrieving one field (aka tags). My use case to request this feature is that we host our own infra but also customer's infrastructure whether it's in our datacenter or an external one.
So, let's say I go to Sites and pick one of this DC and click on the topology icon. It will currently draw a massive topology whereas if I could also say, for this site, just this and this tag (dynamically) it'll narrow down the drawing to what I want.
For example a customer having an interconnect through your gear, If only select the customer tag I would only get the customer gear and would be missing the interconnect through my company's gear.
The only down side I see on your approach is that every time I create a new Tenant and customer tag I'll have to manually edit configuration.py
to add them. I haven't proposed to use Tenant/Tenant Group
because I think people might be using them in different ways as well. In my case, I have a match between two.
Does that make sense? I'm open to ideas :D
Can any of this be configured through the admin portal?
from nextbox-ui-plugin.
Hi @jpobeda
The only down side I see on your approach is that every time I create a new Tenant and customer tag I'll have to manually edit configuration.py to add them.
I made all tag visibility control parameters regexp-based. So you can define just a few base rules if you have a predictable naming convention for your tags. With regular expression syntax, you can do this as specific as you need.
The plugin preforms a re.search based on defined parameter values. This is effectively an any position match of given substring within a tag string. For instance, 'cust' would match 'cust_0001', '0001_cust', and any other tag values containing 'cust' on any position. '^cust_0001$' would match an exact 'cust_0001' tag value and so on.
from nextbox-ui-plugin.
I have just published a new v0.6.0 containing this feature implementation. It is available on PyPi.
Feel free to check this out. I'll appreciate your feedback and further improvement suggestions.
Also some comments on your side questions:
Can any of this be configured through the admin portal?
@jpobeda The quick answer is no. The plugin on its current development stage does not write anything to the database.
Implementing per user setting and persistent views will likely require this. So I will consider implementing this in a future releases.
is it possible to increase topology window to "full view"?)
@Vadims06 There are some NeXt UI limitations in canvas size adaptiveness. I'm looking for a workaround.
from nextbox-ui-plugin.
@iDebugAll , great, thanks! I'll see if I can check it out during the day in test env and get back to you :D
from nextbox-ui-plugin.
Looks great! Thanks!
from nextbox-ui-plugin.
Related Issues (20)
- Improve scroll speed
- Installation Issue HOT 2
- Saving Failed HOT 1
- Plugin installation error HOT 3
- Topology Mapping HOT 1
- Saved current view HOT 3
- top level navigation option
- matching query does not exist HOT 4
- Netbox 3.3.3 - next.css 404 not found HOT 1
- Installation error "module not found" HOT 1
- netbox-docker failed to install plugin HOT 1
- NetBox Plugin Ui Topology Viewer don`t hide name devices
- NetBox 3.5 Support HOT 1
- Permission denied - static files HOT 1
- Unable to Save Views HOT 1
- migration problems after upgrade HOT 2
- fields.E300 error after upgrading Netbox from v3.5.x to v3.6 HOT 6
- Error in database migration HOT 4
- Error in netbox docker compose
- Plugin errors after upgrading Netbox to version 3.7.2 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextbox-ui-plugin.