feat(tasks): 任务列表新增「运行中 Worker」列
TaskListMetricsAll 增加一个 LATERAL 子查询统计 kind='intent' 且 state='running' 的节点数,随 TaskDTO.in_flight 一并返回,口径与任务 详情页概览的「运行中 Worker」完全一致。列表页在「目标进度」后新增该 列,无运行中 Worker 时显示 0。
This commit is contained in:
1 parent
4fba36b73d
commit
f270ca66bc
4 files changed
+22
-4
No files matched your search
@@ -948,6 +948,7 @@ export default function TasksPage() {
|
||||
onSort={sortTasksBy}
|
||||
/>
|
||||
<TableHead className="text-center">目标进度</TableHead>
|
||||
<TableHead className="text-center">运行中 Worker</TableHead>
|
||||
<SortableTaskHead
|
||||
field="created"
|
||||
label="创建时间"
|
||||
@@ -1210,6 +1211,13 @@ const TaskRow = React.memo(function TaskRow({
|
||||
<span className="text-muted-foreground">—</span>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="text-center text-xs tabular-nums">
|
||||
{task.in_flight && task.in_flight > 0 ? (
|
||||
<span className="text-foreground font-medium">{task.in_flight}</span>
|
||||
) : (
|
||||
<span className="text-muted-foreground">0</span>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="text-muted-foreground text-right text-xs whitespace-nowrap tabular-nums">
|
||||
{fmtDateTime(task.created_unix)}
|
||||
</TableCell>
|
||||
|
||||
Reference in new issue
Block a user