mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 13:20:47 +08:00
Add compare result board, richer KPIs, and zip table export.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e9b8042ca7
commit
854b0950f5
7 changed files with 695 additions and 20 deletions
|
|
@ -369,3 +369,13 @@ def api_list_runs(job_id: str, limit: int = 20, db: Session = Depends(get_db)) -
|
|||
@router.get("/compare/runs/{run_id}")
|
||||
def api_get_run(run_id: str, db: Session = Depends(get_db)) -> dict[str, Any]:
|
||||
return cmp_svc.get_run(db, run_id)
|
||||
|
||||
|
||||
@router.get("/compare/runs/{run_id}/export")
|
||||
def api_export_run(run_id: str, db: Session = Depends(get_db)) -> StreamingResponse:
|
||||
data = cmp_svc.export_run_zip(db, run_id)
|
||||
return StreamingResponse(
|
||||
iter([data]),
|
||||
media_type="application/zip",
|
||||
headers={"Content-Disposition": f'attachment; filename="biz_compare_{run_id}.zip"'},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue