release: bump version to 0.45.0
This commit is contained in:
@@ -1,16 +1,26 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Table, Tag, Card, Row, Col, Statistic, Button } from 'antd'
|
||||
import { Table, Tag, Card, Row, Col, Statistic, Button, Tooltip } from 'antd'
|
||||
import { ReloadOutlined, CheckCircleOutlined, CloseCircleOutlined, SyncOutlined } from '@ant-design/icons'
|
||||
import { useAuthStore } from '../../stores/auth'
|
||||
import AppLayout from '../../components/AppLayout/AppLayout'
|
||||
import TableScrollRegion from '../../components/Scrollbar/TableScrollRegion'
|
||||
import { formatDateTimeZhCN } from '../../utils/datetime'
|
||||
import { getPhaseDisplay, getPhaseSummary } from '../../utils/phaseProgress'
|
||||
|
||||
interface Task {
|
||||
id: number
|
||||
collector: string
|
||||
collector?: string
|
||||
datasource_name?: string
|
||||
status: 'success' | 'failed' | 'running' | 'pending'
|
||||
phase?: string | null
|
||||
phase_progress?: number | null
|
||||
phase_message?: string | null
|
||||
phase_current?: number | null
|
||||
phase_total?: number | null
|
||||
phase_unit?: string | null
|
||||
records_processed: number
|
||||
total_records?: number | null
|
||||
progress?: number | null
|
||||
started_at: string
|
||||
completed_at: string
|
||||
duration_seconds: number
|
||||
@@ -53,7 +63,20 @@ function Tasks() {
|
||||
title: '收集器',
|
||||
dataIndex: 'collector',
|
||||
key: 'collector',
|
||||
render: (c: string) => <Tag color="blue">{c}</Tag>,
|
||||
render: (_: string, task: Task) => <Tag color="blue">{task.collector || task.datasource_name || '-'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '阶段',
|
||||
dataIndex: 'phase',
|
||||
key: 'phase',
|
||||
render: (_: string, task: Task) => {
|
||||
const detail = task.phase ? getPhaseDisplay(task) : null
|
||||
return detail ? (
|
||||
<Tooltip title={detail}>
|
||||
<Tag color={task.status === 'running' ? 'processing' : 'default'}>{getPhaseSummary(task)}</Tag>
|
||||
</Tooltip>
|
||||
) : '-'
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
|
||||
Reference in New Issue
Block a user