Dashboard: rebuild into an operator cockpit (0.38.0)

Replace the analytics-style dashboard (stack-health funnel, uptime %,
operations/day grid, AI pill) with an attention-driven fleet cockpit:

- New /api/dashboard/fleet endpoint: server-side fan-out across the local
  host and every agent into one payload — a prioritized "needs attention"
  list, headline KPIs, an honest stack-status breakdown and a per-host
  resource rollup. Each agent uses its own DB session so the fan-out is
  concurrency-safe; failures degrade to "offline" instead of stalling.
- New frontend: AttentionStrip, FleetKpiRow, StackStatusBar and
  HostResourceTable; Dashboard.tsx rewritten around them.
- Remove the funnel/summary endpoints, the uptime sampler loop and the
  ops-activity machinery; delete the now-unused chart components.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-24 11:04:57 +00:00
co-authored by Claude Opus 4.8
parent 5c46e40866
commit c830d28b65
15 changed files with 771 additions and 1067 deletions
+6 -12
View File
@@ -1,4 +1,4 @@
"""Dashboard aggregation endpoints (funnel + summary widgets)."""
"""Dashboard aggregation endpoint (fleet-wide cockpit data)."""
from __future__ import annotations
from fastapi import APIRouter, Depends
@@ -12,18 +12,12 @@ from services import dashboard_service
router = APIRouter(prefix="/api/dashboard", tags=["dashboard"])
@router.get("/funnel")
async def funnel(
@router.get("/fleet")
async def fleet(
refresh: bool = False,
session: Session = Depends(get_session),
_user: User = Depends(get_current_user),
) -> dict:
return await dashboard_service.compute_funnel(session, refresh=refresh)
@router.get("/summary")
async def summary(
session: Session = Depends(get_session),
_user: User = Depends(get_current_user),
) -> dict:
return await dashboard_service.compute_summary(session)
"""Fleet-wide 'needs attention' list, KPIs and per-host rollup across the
local host and every agent — the data behind the operator cockpit."""
return await dashboard_service.compute_fleet(session, refresh=refresh)