Add per-item inventory sparklines with expandable history charts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-19 17:08:40 +02:00
parent 810ad67ab6
commit 6c65732eb1
6 changed files with 300 additions and 9 deletions
+7
View File
@@ -19,6 +19,7 @@ from db import (
get_snapshot,
import_save,
init_db,
inventory_timeline,
list_snapshots,
get_connection,
timeline,
@@ -113,6 +114,12 @@ def api_timeline(viewer_id: str):
return jsonify(timeline(db_path=db_path))
@viewer_bp.route("/api/inventory/timeline")
def api_inventory_timeline(viewer_id: str):
db_path = _resolve_viewer_db(viewer_id)
return jsonify(inventory_timeline(db_path=db_path))
@viewer_bp.route("/api/import", methods=["POST"])
@limiter.limit(IMPORT_LIMIT)
def api_import(viewer_id: str):