import { useState, useCallback, useEffect } from 'react'; import { Link } from 'react-router-dom'; import { batchApi, type DashboardResponse, type DashboardStats, type ExecutionStatisticsDto, } from '../api/batchApi'; import { usePoller } from '../hooks/usePoller'; import { useToastContext } from '../contexts/ToastContext'; import StatusBadge from '../components/StatusBadge'; import EmptyState from '../components/EmptyState'; import LoadingSpinner from '../components/LoadingSpinner'; import BarChart from '../components/BarChart'; import { formatDateTime, calculateDuration } from '../utils/formatters'; const POLLING_INTERVAL = 5000; interface StatCardProps { label: string; value: number; gradient: string; to?: string; } function StatCard({ label, value, gradient, to }: StatCardProps) { const content = (
{value}
{label}
| 작업명 | 실행 ID | 시작 시간 | 상태 |
|---|---|---|---|
| {job.jobName} | #{job.executionId} | {formatDateTime(job.startTime)} |
|
| 실행 ID | 작업명 | 시작 시간 | 종료 시간 | 소요 시간 | 상태 |
|---|---|---|---|---|---|
| #{exec.executionId} | {exec.jobName} | {formatDateTime(exec.startTime)} | {formatDateTime(exec.endTime)} | {calculateDuration(exec.startTime, exec.endTime)} |
|
| 실행 ID | 작업명 | 시작 시간 | 오류 메시지 |
|---|---|---|---|
| #{fail.executionId} | {fail.jobName} | {formatDateTime(fail.startTime)} | {fail.exitMessage ? fail.exitMessage.length > 50 ? `${fail.exitMessage.slice(0, 50)}...` : fail.exitMessage : '-'} |