fix(web): 避免報表頁打受保護統計 API
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
Code Review / ai-code-review (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-18 19:00:30 +08:00
parent b645d0607b
commit 63a75f7784
3 changed files with 6 additions and 4 deletions

View File

@@ -162,8 +162,8 @@ export default function ReportsPage({ params }: { params: { locale: string } })
setLoading(true)
setError(false)
Promise.all([
fetchJson<IncidentSummary>('/api/v1/stats/incidents/summary?days=30'),
fetchJson<ResolutionStats>('/api/v1/stats/incidents/resolution?days=30'),
Promise.resolve(null as IncidentSummary | null),
Promise.resolve(null as ResolutionStats | null),
fetchJson<DispositionResponse>('/api/v1/stats/disposition'),
fetchJson<ReportStatusBoardSnapshot>('/api/v1/agents/agent-report-status-board'),
])
@@ -293,8 +293,8 @@ export default function ReportsPage({ params }: { params: { locale: string } })
icon={<Activity className="h-4 w-4" />}
label={t('command.metrics.alerts')}
value={incidentTotal || '--'}
detail={allZeroSignal ? t('command.details.noSignal') : t('command.details.alertSignal')}
tone={allZeroSignal ? 'warn' : 'neutral'}
detail={!sourceState.incident ? t('command.details.incidentGap') : allZeroSignal ? t('command.details.noSignal') : t('command.details.alertSignal')}
tone={!sourceState.incident || allZeroSignal ? 'warn' : 'neutral'}
/>
<CommandMetric
icon={<Bot className="h-4 w-4" />}