Add LLDP pause/resume/stop with restart recovery, and localize ops task titles.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-04 22:23:44 +08:00
parent ba038a3af6
commit 8ded8eeb7d
14 changed files with 923 additions and 136 deletions

View file

@ -14,7 +14,10 @@ from .lldp_collect_service import (
get_job_detail,
get_policy,
list_jobs,
pause_collect,
resume_collect,
start_collect,
stop_collect,
update_policy,
)
@ -43,6 +46,21 @@ def api_start(db: Session = Depends(get_db)) -> dict[str, Any]:
return start_collect(db, trigger_mode="manual")
@router.post("/jobs/{job_id}/pause")
def api_pause_job(job_id: str, db: Session = Depends(get_db)) -> dict[str, Any]:
return pause_collect(db, job_id)
@router.post("/jobs/{job_id}/resume")
def api_resume_job(job_id: str, db: Session = Depends(get_db)) -> dict[str, Any]:
return resume_collect(db, job_id)
@router.post("/jobs/{job_id}/stop")
def api_stop_job(job_id: str, db: Session = Depends(get_db)) -> dict[str, Any]:
return stop_collect(db, job_id)
@router.get("/jobs")
def api_list_jobs(
page: int = Query(default=1, ge=1),