Add collect dashboard KPIs and create-job modal.

Align collection tasks with LLDP/config-sync chrome, and refresh active-task overview when jobs change.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-05 14:08:13 +08:00
parent 0100fb8430
commit 6642f4b8b5
11 changed files with 502 additions and 249 deletions

View file

@ -8,6 +8,7 @@ from .collection_service import (
build_collection_job_zip,
create_collection,
delete_collection_job,
get_collection_dashboard,
get_collection_job,
list_collection_jobs,
list_collection_runs,
@ -36,6 +37,11 @@ def api_eligible_ne(
return list_eligible_ne(db, page=page, page_size=page_size, keyword=keyword)
@router.get("/dashboard")
def api_collection_dashboard(db: Session = Depends(get_db)):
return get_collection_dashboard(db).model_dump()
@router.post("")
def api_create_collection(body: CollectionJobCreate, db: Session = Depends(get_db)):
return create_collection(db, body).model_dump()