fix(web): 避免報表頁打受保護統計 API
This commit is contained in:
@@ -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" />}
|
||||
|
||||
Reference in New Issue
Block a user