fix: update agent field names in frontend to match backend DTO
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m6s
CI / docker (push) Successful in 57s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 37s

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:
hsiegeln
2026-04-01 20:36:31 +02:00
parent f82aa26371
commit a028905e41
5 changed files with 21 additions and 21 deletions

View File

@@ -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" />}