(status)
| 1685 | |
| 1686 | // 更新任务状态 |
| 1687 | function updateTaskStatus(status) { |
| 1688 | const statusInfo = { |
| 1689 | pending: { text: '等待中', class: 'pending' }, |
| 1690 | running: { text: '运行中', class: 'running' }, |
| 1691 | completed: { text: '已完成', class: 'completed' }, |
| 1692 | failed: { text: '失败', class: 'failed' }, |
| 1693 | cancelled: { text: '已取消', class: 'disabled' }, |
| 1694 | checking: { text: '检查中', class: 'running' }, |
| 1695 | idle: { text: '空闲', class: 'completed' }, |
| 1696 | disabled: { text: '已禁用', class: 'disabled' }, |
| 1697 | error: { text: '异常', class: 'failed' }, |
| 1698 | cancelling: { text: '取消中', class: 'running' }, |
| 1699 | }; |
| 1700 | |
| 1701 | const info = statusInfo[status] || { text: status, class: '' }; |
| 1702 | elements.taskStatusBadge.textContent = info.text; |
| 1703 | elements.taskStatusBadge.className = `status-badge ${info.class}`; |
| 1704 | elements.taskStatus.textContent = info.text; |
| 1705 | } |
| 1706 | |
| 1707 | // 显示批量状态 |
| 1708 | function showBatchStatus(batch) { |
no outgoing calls
no test coverage detected