From e0bd1d4e86d06ec3130bc2f5837967c7bb21bb16 Mon Sep 17 00:00:00 2001 From: mattieserver <3049868+mattieserver@users.noreply.github.com> Date: Mon, 26 Dec 2022 12:07:01 +0100 Subject: [PATCH] Closes #160: feature save filters (#227) * initial saved filter support * add filter field * fixed model * changed margin --- netbox_topology_views/forms.py | 1 + .../static/netbox_topology_views/css/app.css | 2 +- netbox_topology_views/static_dev/css/app.scss | 2 +- .../templates/netbox_topology_views/index.html | 6 ++++++ netbox_topology_views/views.py | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/netbox_topology_views/forms.py b/netbox_topology_views/forms.py index dfa7b2d..e517ca9 100644 --- a/netbox_topology_views/forms.py +++ b/netbox_topology_views/forms.py @@ -31,6 +31,7 @@ class DeviceFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm): None, ( "q", + "filter_id", "hide_unconnected", "save_coords", "show_circuit", diff --git a/netbox_topology_views/static/netbox_topology_views/css/app.css b/netbox_topology_views/static/netbox_topology_views/css/app.css index 8cf0d69..a411c7b 100644 --- a/netbox_topology_views/static/netbox_topology_views/css/app.css +++ b/netbox_topology_views/static/netbox_topology_views/css/app.css @@ -1 +1 @@ -#visgraph{height:70vh}html[data-netbox-color-mode=dark] #visgraph{background-color:#212529}.image-dropdown img{width:64px;height:64px}.image-dropdown-content{display:flex;flex-wrap:wrap;gap:.5rem;padding-inline:.5rem;width:50vw;max-width:32rem}.image-dropdown-content>img{cursor:pointer} +#visgraph{height:64vh}html[data-netbox-color-mode=dark] #visgraph{background-color:#212529}.image-dropdown img{width:64px;height:64px}.image-dropdown-content{display:flex;flex-wrap:wrap;gap:.5rem;padding-inline:.5rem;width:50vw;max-width:32rem}.image-dropdown-content>img{cursor:pointer} diff --git a/netbox_topology_views/static_dev/css/app.scss b/netbox_topology_views/static_dev/css/app.scss index f76d1be..8394179 100644 --- a/netbox_topology_views/static_dev/css/app.scss +++ b/netbox_topology_views/static_dev/css/app.scss @@ -1,5 +1,5 @@ #visgraph { - height: 70vh; + height: 64vh; } html[data-netbox-color-mode=dark] #visgraph { diff --git a/netbox_topology_views/templates/netbox_topology_views/index.html b/netbox_topology_views/templates/netbox_topology_views/index.html index 6a88e2b..2b5e5bf 100644 --- a/netbox_topology_views/templates/netbox_topology_views/index.html +++ b/netbox_topology_views/templates/netbox_topology_views/index.html @@ -48,6 +48,12 @@ {% with config=settings.PLUGINS_CONFIG.netbox_topology_views %}