mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(panel): phantom agent states in dashboard + metrics counters
by_state.running / a.state 'running'/'stopped' never exist in the orchestrator enum (offline/starting/active/waiting/idle/stopping), so these counters were structurally zero — same class as the agents-page Active bug, remaining two sites.
This commit is contained in:
@@ -250,11 +250,11 @@ function PerformanceTabContent() {
|
||||
|
||||
// Agent counts
|
||||
const runningAgents =
|
||||
status?.by_state?.running ||
|
||||
agentList.filter((a) => a.state === "running").length;
|
||||
status?.by_state?.active ||
|
||||
agentList.filter((a) => a.state === "active").length;
|
||||
const idleAgents =
|
||||
status?.by_state?.idle ||
|
||||
agentList.filter((a) => a.state === "idle" || a.state === "stopped").length;
|
||||
agentList.filter((a) => a.state === "idle" || a.state === "offline").length;
|
||||
const waitingAgents =
|
||||
status?.waiting_count ||
|
||||
agentList.filter((a) => a.state === "waiting_long").length;
|
||||
|
||||
@@ -80,7 +80,7 @@ export function useMetrics() {
|
||||
blockers,
|
||||
agents: {
|
||||
total_agents: agentStatus?.total_agents ?? 0,
|
||||
running: agentStatus?.by_state?.running ?? 0,
|
||||
running: agentStatus?.by_state?.active ?? 0,
|
||||
idle: agentStatus?.by_state?.idle ?? 0,
|
||||
waiting: agentStatus?.waiting_count ?? 0,
|
||||
errors: 0,
|
||||
|
||||
Reference in New Issue
Block a user