mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 04:20:45 +08:00
Add ops task overview, chart ahead window, and WebCRT lifecycle status.
Unify live runners in /audit/tasks (including UME sync and connect tests), extend port-traffic compare past now via ahead_hours, and distinguish WebCRT connecting/ready/detached. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3f0787da11
commit
3908b78dbb
28 changed files with 1083 additions and 54 deletions
23
netx_api/ops_router.py
Normal file
23
netx_api/ops_router.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"""Ops overview APIs (live task board)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Annotated, Any
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from .auth_deps import AuthContext, require_user
|
||||
from .db import get_db
|
||||
from .ops_tasks_service import list_ops_tasks
|
||||
|
||||
router = APIRouter(prefix="/v1/ops", tags=["ops"])
|
||||
|
||||
|
||||
@router.get("/tasks")
|
||||
def api_ops_tasks(
|
||||
ctx: Annotated[AuthContext, Depends(require_user)],
|
||||
db: Session = Depends(get_db),
|
||||
) -> dict[str, Any]:
|
||||
_ = ctx
|
||||
return list_ops_tasks(db)
|
||||
Loading…
Add table
Add a link
Reference in a new issue