feat(ui): jump to workflow detail page in dashboard

This commit is contained in:
Fu Diwei 2025-01-22 03:44:54 +08:00
parent 79c1da6d14
commit 7e0f575e0a
2 changed files with 17 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{ {
"workflow_run.action.edit": "查看详情", "workflow_run.action.edit": "查看详情",
"workflow_run.action.delete": "删除执行历史", "workflow_run.action.delete": "删除执行历史",
"workflow_run.action.delete.confirm": "确定要删除此执行历史吗?", "workflow_run.action.delete.confirm": "确定要删除此执行历史吗?此操作仅清除日志,不会影响各节点的执行结果和签发的证书。",
"workflow_run.props.id": "ID", "workflow_run.props.id": "ID",
"workflow_run.props.status": "状态", "workflow_run.props.status": "状态",

View File

@ -85,14 +85,22 @@ const Dashboard = () => {
key: "name", key: "name",
title: t("workflow.props.name"), title: t("workflow.props.name"),
ellipsis: true, ellipsis: true,
render: (_, record) => ( render: (_, record) => {
<Space className="max-w-full" direction="vertical" size={4}> const workflow = record.expand?.workflowId;
<Typography.Text ellipsis>{record.expand?.workflowId?.name}</Typography.Text> return (
<Typography.Text type="secondary" ellipsis> <Typography.Link
{record.expand?.workflowId?.description} type="secondary"
</Typography.Text> ellipsis
</Space> onClick={() => {
), if (workflow) {
navigate(`/workflows/${workflow.id}`);
}
}}
>
{workflow?.name ?? <span className="font-mono">{t(`#${record.workflowId}`)}</span>}
</Typography.Link>
);
},
}, },
{ {
key: "status", key: "status",