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

@ -185,6 +185,7 @@ def _collection_items(db: Session, actors: dict[str, str]) -> list[dict[str, Any
ok = int(row.success_count or 0)
fail = int(row.fail_count or 0)
total = int(row.ne_count or 0)
done = ok + fail
items.append(
_item(
kind="ne_collect",
@ -195,7 +196,7 @@ def _collection_items(db: Session, actors: dict[str, str]) -> list[dict[str, Any
actor=actor,
started_at=row.started_at or row.created_at,
updated_at=row.last_run_at or row.ended_at or row.started_at or row.created_at,
progress=f"{ok}/{fail}/{total}",
progress=f"{done}/{total}",
inflight=int(running),
detail=str(row.error_message or "")[:240],
href="/network/tasks/collect",