Closes #252,#78,#177,#265: Move options from config file to GUI (#262)

* Added some individual options

* Added general options

* Added show_single_cable_logical_conns and draw_default_layout

* Added ignore_cable_type to IndividualOptions

* Corrected permission, tiny improvements

* Add preselected_device_roles to IndividualOptions

* Add preselected_tags

* Updated documentation

* Update README.md

* Corrected queryset for preselected_tags

* Update README.md

* move supported_termination_types to inside the function to prevent migration issues

* removed general options

* added new migration script

---------

Co-authored-by: Mattijs Vanhaverbeke <mattijs.vanhaverbeke@ebo-enterprises.com>
This commit is contained in:
Mario
2023-03-23 09:57:51 +01:00
committed by GitHub
co-authored by Mattijs Vanhaverbeke
parent 4fbc2fd8ce
commit 5d20a7ad15
10 changed files with 396 additions and 127 deletions
+7 -1
View File
@@ -1,7 +1,8 @@
from dcim.models import Device, DeviceRole
from rest_framework.serializers import ModelSerializer
from netbox.api.serializers import NetBoxModelSerializer
from netbox_topology_views.models import RoleImage
from netbox_topology_views.models import RoleImage, IndividualOptions
class TopologyDummySerializer(ModelSerializer):
@@ -20,3 +21,8 @@ class DeviceRoleSerializer(ModelSerializer):
class Meta:
model = DeviceRole
fields = ("name", "slug", "color", "vm_role", "description")
class IndividualOptionsSerializer(NetBoxModelSerializer):
class Meta:
model = IndividualOptions
fields = ("ignore_cable_type", "show_unconnected", "show_cables", "show_logical_connections", "show_single_cable_logical_conns", "show_circuit", "show_power", "show_wireless", "draw_default_layout")