fix: update agent field names in frontend to match backend DTO
The AgentInstanceResponse backend DTO uses instanceId, displayName, applicationId, status — but the stale schema.d.ts still had id, name, application, state. This caused the runtime table to show no data. - Update schema.d.ts AgentInstanceResponse fields - Fix AgentHealth: row.id→instanceId, row.name→displayName, row.application→applicationId, inst.id→instanceId - Fix AgentInstance: agent.id→instanceId, agent.name→displayName - Fix ExchangeHeader: agent.id→instanceId, agent.state→status - Fix LayoutShell search: agent.state→status, agentTps→tps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,13 +48,13 @@ export default function AgentInstance() {
|
||||
const { data: timeseries } = useStatsTimeseries(timeFrom, timeTo, undefined, appId);
|
||||
|
||||
const agent = useMemo(
|
||||
() => (agents || []).find((a: any) => a.id === instanceId) as any,
|
||||
() => (agents || []).find((a: any) => a.instanceId === instanceId) as any,
|
||||
[agents, instanceId],
|
||||
);
|
||||
|
||||
// Stat card metrics (latest 1 bucket)
|
||||
const { data: latestMetrics } = useAgentMetrics(
|
||||
agent?.id || null,
|
||||
agent?.instanceId || null,
|
||||
['jvm.cpu.process', 'jvm.memory.heap.used', 'jvm.memory.heap.max'],
|
||||
1,
|
||||
);
|
||||
@@ -65,7 +65,7 @@ export default function AgentInstance() {
|
||||
|
||||
// Chart metrics (60 buckets)
|
||||
const { data: jvmMetrics } = useAgentMetrics(
|
||||
agent?.id || null,
|
||||
agent?.instanceId || null,
|
||||
['jvm.cpu.process', 'jvm.memory.heap.used', 'jvm.memory.heap.max', 'jvm.threads.count', 'jvm.gc.time'],
|
||||
60,
|
||||
);
|
||||
@@ -236,7 +236,7 @@ export default function AgentInstance() {
|
||||
{appId}
|
||||
</Link>
|
||||
<span className={styles.scopeSep}><ChevronRight size={12} /></span>
|
||||
<span className={styles.scopeCurrent}>{agent.name}</span>
|
||||
<span className={styles.scopeCurrent}>{agent.displayName}</span>
|
||||
<StatusDot variant={statusVariant} />
|
||||
<Badge label={agent.status} color={statusColor} />
|
||||
{agent.version && <Badge label={agent.version} variant="outlined" color="auto" />}
|
||||
|
||||
Reference in New Issue
Block a user