- DataPipeline: 4단계 흐름도(PipelineChart), L1/L2/L3 캐시 현황, 일별 처리량 추이(LineChart), 최근 실행 이력 - AreaStats: 대해구별 선박 통계 테이블, 처리량(파티션 크기), 데이터 품질 검증 - LineChart, PipelineChart 차트 컴포넌트 신규 - API 타입 추가 (CacheDetails, HaeguStat, ThroughputMetrics, DataQuality) - monitorApi에 getCacheDetails, getHaeguRealtimeStats, getQuality 추가 - i18n pipeline.*, area.* 번역 키 추가 (ko/en) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
import { fetchJson } from './httpClient.ts'
|
|
import type {
|
|
CacheDetails,
|
|
CacheStats,
|
|
DataQuality,
|
|
HaeguStat,
|
|
MetricsSummary,
|
|
ProcessingDelay,
|
|
ThroughputMetrics,
|
|
} from './types.ts'
|
|
|
|
export const monitorApi = {
|
|
getDelay(): Promise<ProcessingDelay> {
|
|
return fetchJson('/monitor/delay')
|
|
},
|
|
|
|
getMetricsSummary(): Promise<MetricsSummary> {
|
|
return fetchJson('/admin/metrics/summary')
|
|
},
|
|
|
|
getCacheStats(): Promise<CacheStats> {
|
|
return fetchJson('/api/monitoring/cache/stats')
|
|
},
|
|
|
|
getCacheDetails(): Promise<CacheDetails> {
|
|
return fetchJson('/api/monitoring/cache/details')
|
|
},
|
|
|
|
getDailyCacheStatus(): Promise<Record<string, unknown>> {
|
|
return fetchJson('/api/websocket/daily-cache')
|
|
},
|
|
|
|
getThroughput(): Promise<ThroughputMetrics> {
|
|
return fetchJson('/monitor/throughput')
|
|
},
|
|
|
|
getQuality(): Promise<DataQuality> {
|
|
return fetchJson('/monitor/quality')
|
|
},
|
|
|
|
getHaeguRealtimeStats(): Promise<HaeguStat[]> {
|
|
return fetchJson('/monitor/haegu/realtime')
|
|
},
|
|
|
|
getHaeguStats(): Promise<Record<string, unknown>[]> {
|
|
return fetchJson('/admin/haegu/stats')
|
|
},
|
|
}
|