feat(admin): add admin backend endpoints and service layer
Why: - Dashboard needs system health, Qdrant management, chunk preview, questions, and cost estimation endpoints Changes: - Add admin router with 11 endpoints (health, Qdrant CRUD, chunk preview, questions management, cost estimation) - Add delete_experiment to SQLite storage - Mount admin router and dashboard static files at /app Impact: - New /admin/* API routes available - Dashboard served at /app/ via StaticFiles
This commit is contained in:
@@ -311,6 +311,17 @@ def list_experiments(
|
||||
conn.close()
|
||||
|
||||
|
||||
def delete_experiment(experiment_id: str) -> bool:
|
||||
"""Delete an experiment by ID."""
|
||||
conn = _connect()
|
||||
try:
|
||||
cur = conn.execute("DELETE FROM experiments WHERE id = ?", (experiment_id,))
|
||||
conn.commit()
|
||||
return cur.rowcount > 0
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
# ── Internal helpers ───────────────────────────────────────────────
|
||||
|
||||
_JSON_FIELDS = {"chunk_counts", "retrieved_chunks", "latency_breakdown",
|
||||
|
||||
Reference in New Issue
Block a user