| 1857 | |
| 1858 | // 加载最近注册任务 |
| 1859 | function getRegistrationTaskStatusMeta(status) { |
| 1860 | const normalized = String(status || '').trim().toLowerCase(); |
| 1861 | const mapping = { |
| 1862 | pending: { text: '等待中', className: 'pending' }, |
| 1863 | running: { text: '运行中', className: 'running' }, |
| 1864 | completed: { text: '已完成', className: 'completed' }, |
| 1865 | failed: { text: '失败', className: 'failed' }, |
| 1866 | cancelled: { text: '已取消', className: 'disabled' }, |
| 1867 | }; |
| 1868 | return mapping[normalized] || { text: status || '-', className: 'pending' }; |
| 1869 | } |
| 1870 | |
| 1871 | function formatRecentTaskTime(task) { |
| 1872 | const source = task.completed_at || task.started_at || task.created_at; |