fix: correct response field mappings and add logout button
- SearchResult uses 'data' not 'items', 'total' not 'totalCount' - ExecutionStats uses 'p99LatencyMs' not 'p99DurationMs' - TimeseriesBucket uses 'time' not 'timestamp' - Add user Dropdown with logout action to LayoutShell Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ export default function Dashboard() {
|
||||
const { data: snapshot } = useProcessorSnapshot(selectedId, processorIdx);
|
||||
|
||||
const rows: Row[] = useMemo(() =>
|
||||
(searchResult?.items || []).map((e: ExecutionSummary) => ({ ...e, id: e.executionId })),
|
||||
(searchResult?.data || []).map((e: ExecutionSummary) => ({ ...e, id: e.executionId })),
|
||||
[searchResult],
|
||||
);
|
||||
|
||||
@@ -89,7 +89,7 @@ export default function Dashboard() {
|
||||
<StatCard label="Total Exchanges" value={stats?.totalCount ?? 0} sparkline={sparklineData} />
|
||||
<StatCard label="Failed" value={stats?.failedCount ?? 0} accent="error" />
|
||||
<StatCard label="Avg Duration" value={`${stats?.avgDurationMs ?? 0}ms`} />
|
||||
<StatCard label="P99 Duration" value={`${stats?.p99DurationMs ?? 0}ms`} accent="warning" />
|
||||
<StatCard label="P99 Duration" value={`${stats?.p99LatencyMs ?? 0}ms`} accent="warning" />
|
||||
<StatCard label="Active" value={stats?.activeCount ?? 0} accent="running" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export default function RoutesMetrics() {
|
||||
<div style={{ display: 'flex', gap: '1rem', marginBottom: '1.5rem', flexWrap: 'wrap' }}>
|
||||
<StatCard label="Total Throughput" value={stats?.totalCount ?? 0} sparkline={sparklineData} />
|
||||
<StatCard label="Error Rate" value={stats?.totalCount ? `${(((stats.failedCount ?? 0) / stats.totalCount) * 100).toFixed(1)}%` : '0%'} accent="error" />
|
||||
<StatCard label="P99 Latency" value={`${stats?.p99DurationMs ?? 0}ms`} accent="warning" />
|
||||
<StatCard label="P99 Latency" value={`${stats?.p99LatencyMs ?? 0}ms`} accent="warning" />
|
||||
<StatCard label="Success Rate" value={stats?.totalCount ? `${(((stats.totalCount - (stats.failedCount ?? 0)) / stats.totalCount) * 100).toFixed(1)}%` : '100%'} accent="success" />
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user