mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 04:20:45 +08:00
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>
23 lines
557 B
Python
23 lines
557 B
Python
"""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)
|