Phase 17: multi-host dashboard (0.19.0)

The dashboard now renders a stacks-with-usage table per host: the local host
plus a section for each registered agent (online dot + offline notice), reusing
the same CPU/memory meters and inline start/stop/restart actions.

- agent_app.py: GET /agent/stacks/stats (reuses stats_service); /agent/system
  now also returns cpu_cores + mem_total for remote meter references.
- routers/agents.py: proxy GET /api/agents/{id}/stacks/stats (declared before
  /{agent_id}/stacks/{stack_id}).
- Frontend: agentsApi.system + stackStats; Dashboard refactored into a shared
  StacksTable used by the local section and a per-agent AgentDashboardSection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-08 13:15:33 +00:00
co-authored by Claude Opus 4.8
parent 56450efd82
commit 8fbacd200a
7 changed files with 234 additions and 67 deletions
+10
View File
@@ -213,6 +213,16 @@ async def agent_stacks(
return stacks
@router.get("/{agent_id}/stacks/stats")
async def agent_stacks_stats(
agent_id: int,
session: Session = Depends(get_session),
_user: User = Depends(get_current_user),
) -> dict:
agent = _get_or_404(session, agent_id)
return await _proxy(session, agent, "GET", "/agent/stacks/stats")
@router.get("/{agent_id}/stacks/{stack_id}")
async def agent_stack_detail(
agent_id: int,