From aabe273172b1c6784ca6b5e7f4950ea767c731ed Mon Sep 17 00:00:00 2001 From: Darek Date: Sun, 19 Apr 2026 08:54:50 -0500 Subject: [PATCH] Add location and fill-status filters to device list --- app.py | 4 ++- templates/device_list.html | 61 +++++++++++++++++++++++++++++--------- 2 files changed, 50 insertions(+), 15 deletions(-) diff --git a/app.py b/app.py index 2ca8e91..2bf9922 100644 --- a/app.py +++ b/app.py @@ -633,7 +633,9 @@ def create_app(config_object="config"): def device_list(): devices = db.query(Device).order_by(Device.name).all() device_types = sorted({d.device_type for d in devices if d.device_type}) - return render_template("device_list.html", devices=devices, device_types=device_types) + device_locations = sorted({d.location for d in devices if d.location}) + return render_template("device_list.html", devices=devices, + device_types=device_types, device_locations=device_locations) # ------------------------------------------------------------------ # # Devices — add diff --git a/templates/device_list.html b/templates/device_list.html index 49ef61c..6e6d84e 100644 --- a/templates/device_list.html +++ b/templates/device_list.html @@ -13,6 +13,20 @@ {% endfor %} + +