netbox-community / netbox-topology-views

A netbox plugin that draws topology views
Apache License 2.0
744 stars 63 forks source link

Closes #329: Draw rectangles around Sites/Locations/Racks #462

Closed dreng closed 7 months ago

dreng commented 7 months ago

This PR adds the ability to draw rectangles around Sites, Locations and Racks.

Three new checkboxes have been added to the filter form: new_options

You can combine them as you like. You may show only sites... sites locations... locations racks... racks a combination... sites_racks or simply all of them. sites_locations_racks

If you move device icons around, the rectangles will follow and will be redrawn.

https://github.com/mattieserver/netbox-topology-views/assets/20901110/cc92fcb4-802b-4d4d-a0c0-ae3fd402e7c6

I thought it would be cool to be able to click on a rectangle in order to select all group members. Unfortunately I didn't manage to implement that. Either the graph listener interferes with my canvas listener or I'm doing something wrong. I gave up for now but if some of you guys have a good idea how to get it to work, don't hesitate to tell.

mattieserver commented 7 months ago

Looks good to me. I guess there will be a few cases where we have an overlap of rectangles but there is not much we can do about it.