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 %}
+ {# Applied filters #} + {% if filter_form %} + {% applied_filters model filter_form request.GET %} +
+ {% endif %} +
diff --git a/netbox_topology_views/views.py b/netbox_topology_views/views.py index cee8c09..7568e50 100644 --- a/netbox_topology_views/views.py +++ b/netbox_topology_views/views.py @@ -540,6 +540,7 @@ class TopologyHomeView(PermissionRequiredMixin, View): "device_type", "device_role" ) self.queryset = self.filterset(request.GET, self.queryset).qs + self.model = self.queryset.model topo_data = None if request.GET: @@ -630,6 +631,7 @@ class TopologyHomeView(PermissionRequiredMixin, View): "filter_form": DeviceFilterForm(request.GET, label_suffix=""), "topology_data": json.dumps(topo_data), "broken_image": find_image_url("role-unknown"), + "model": self.model, }, )