Link filament spools card on dashboard to FilamentDB (new tab)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user