Closes #436 (and #122?): Add options to disable smooth cables and physics (#488)

* allow disabling smooth cables and render them as straight lines instead

* rename 'disable_smooth_cables' to 'straight_cables'

* missed one in renaming

* fix inverted logic

* add GET param and option to DeviceFilterForm

* fix syntax error

* rename var

* add missing query field

* netbox v4 support

---------

Co-authored-by: Daniel Bremer <daniel.bremer@mpsd.mpg.de>
Co-authored-by: mvanhaverbeke <mattijs.vanhaverbeke@ebo-enterprises.com>
This commit is contained in:
dremerb
2024-07-08 15:37:18 +02:00
committed by GitHub
co-authored by Daniel Bremer mvanhaverbeke
parent 142de460b9
commit aba0598947
7 changed files with 65 additions and 9 deletions
+7 -2
View File
@@ -177,8 +177,13 @@ def get_query_settings(request):
if "show_neighbors" in request.GET:
if request.GET["show_neighbors"] == "True" :
show_neighbors = True
return filter_id, save_coords, show_unconnected, show_power, show_circuit, show_logical_connections, show_single_cable_logical_conns, show_cables, show_wireless, group_sites, group_locations, group_racks, show_neighbors
straight_cables = False
if "straight_cables" in request.GET:
if request.GET["straight_cables"] == "True":
straight_cables = True
return filter_id, save_coords, show_unconnected, show_power, show_circuit, show_logical_connections, show_single_cable_logical_conns, show_cables, show_wireless, group_sites, group_locations, group_racks, show_neighbors, straight_cables
class LinePattern():
wireless = [2, 10, 2, 10]