From bc1769625e8be880f6addfb4bbc300c9d9180b2b Mon Sep 17 00:00:00 2001 From: Martin Hohenberg Date: Thu, 18 Jun 2026 22:20:49 +0200 Subject: [PATCH] Link filament spools card on dashboard to FilamentDB (new tab) Co-Authored-By: Claude Sonnet 4.6 --- app/routers/ui.py | 2 ++ app/templates/dashboard.html | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/routers/ui.py b/app/routers/ui.py index b58b025..81aa342 100644 --- a/app/routers/ui.py +++ b/app/routers/ui.py @@ -1,3 +1,4 @@ +import os import uuid as _uuid from pathlib import Path @@ -42,6 +43,7 @@ def dashboard(request: Request, db: Session = Depends(get_db)): PrintJob.status.in_([JobStatus.queued, JobStatus.printing]) ).count(), "total_filaments": sum(r.get("rolls_in_stock", 0) for r in get_stock()), + "filamentdb_url": os.environ.get("FILAMENTDB_URL", ""), "recent_jobs": db.query(PrintJob).order_by(PrintJob.created_at.desc()).limit(5).all(), }) diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html index 7f41896..2cfb5be 100644 --- a/app/templates/dashboard.html +++ b/app/templates/dashboard.html @@ -25,10 +25,12 @@
-
-
Filament Spools
-
{{ total_filaments }}
-
+ +
+
Filament Spools
+
{{ total_filaments }}
+
+