|
|
@@ -1,4 +1,4 @@
|
|
|
-import { Progress, Tag } from "antd";
|
|
|
+import { Progress, Tag, Tooltip } from "antd";
|
|
|
import { ITaskData, ITaskResponse } from "../api/task";
|
|
|
import { useIntl } from "react-intl";
|
|
|
import { useEffect, useState } from "react";
|
|
|
@@ -52,6 +52,7 @@ const TaskStatus = ({ task }: IWidget) => {
|
|
|
color = "warning";
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
return (
|
|
|
<>
|
|
|
<Tag color={color}>
|
|
|
@@ -61,9 +62,17 @@ const TaskStatus = ({ task }: IWidget) => {
|
|
|
})}
|
|
|
</Tag>
|
|
|
{task?.status === "running" ? (
|
|
|
- <div style={{ display: "inline-block", width: 80 }}>
|
|
|
- <Progress percent={progress} size="small" showInfo={false} />
|
|
|
- </div>
|
|
|
+ progress && progress > 0 ? (
|
|
|
+ <div style={{ display: "inline-block", width: 80 }}>
|
|
|
+ <Tooltip title={`${progress}%`}>
|
|
|
+ <Progress percent={progress} size="small" showInfo={false} />
|
|
|
+ </Tooltip>
|
|
|
+ </div>
|
|
|
+ ) : task?.executor?.roles?.includes("ai") ? (
|
|
|
+ <>任务排队中</>
|
|
|
+ ) : (
|
|
|
+ <></>
|
|
|
+ )
|
|
|
) : (
|
|
|
<></>
|
|
|
)}
|