From d29427b018f36d01bee57dcfeaa718de3bf71007 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 24 Jul 2025 20:22:31 +0800 Subject: [PATCH] feat(ui): new Dashboard page --- .../provider/AccessProviderPicker.tsx | 2 +- .../provider/DeploymentProviderPicker.tsx | 2 +- .../components/workflow/WorkflowRunDetail.tsx | 2 +- ui/src/components/workflow/WorkflowRuns.tsx | 48 ++-- ui/src/i18n/locales/en/nls.access.json | 2 +- ui/src/i18n/locales/en/nls.certificate.json | 2 +- ui/src/i18n/locales/en/nls.common.json | 1 - ui/src/i18n/locales/en/nls.dashboard.json | 3 +- ui/src/i18n/locales/en/nls.provider.json | 6 +- ui/src/i18n/locales/en/nls.settings.json | 2 +- .../i18n/locales/en/nls.workflow.nodes.json | 4 +- ui/src/i18n/locales/en/nls.workflow.runs.json | 9 +- ui/src/i18n/locales/zh/nls.access.json | 6 +- ui/src/i18n/locales/zh/nls.certificate.json | 4 +- ui/src/i18n/locales/zh/nls.common.json | 1 - ui/src/i18n/locales/zh/nls.dashboard.json | 3 +- ui/src/i18n/locales/zh/nls.settings.json | 2 +- ui/src/i18n/locales/zh/nls.workflow.json | 2 +- .../i18n/locales/zh/nls.workflow.nodes.json | 4 +- ui/src/i18n/locales/zh/nls.workflow.runs.json | 7 +- ui/src/pages/accesses/AccessList.tsx | 108 ++++---- ui/src/pages/certificates/CertificateList.tsx | 86 +++---- ui/src/pages/dashboard/Dashboard.tsx | 242 +++++++++++------- ui/src/pages/workflows/WorkflowDetail.tsx | 2 +- ui/src/pages/workflows/WorkflowList.tsx | 110 ++++---- 25 files changed, 376 insertions(+), 284 deletions(-) diff --git a/ui/src/components/provider/AccessProviderPicker.tsx b/ui/src/components/provider/AccessProviderPicker.tsx index 44373999..b3c8aeda 100644 --- a/ui/src/components/provider/AccessProviderPicker.tsx +++ b/ui/src/components/provider/AccessProviderPicker.tsx @@ -86,7 +86,7 @@ const AccessProviderPicker = ({ className, style, autoFocus, placeholder, showOp setKeyword(e.target.value.trim())} />
- 0} fallback={}> + 0} fallback={}>
- 0} fallback={}> + 0} fallback={}>
{ dataSource={tableData} loading={tableLoading} locale={{ - emptyText: , + emptyText: , }} pagination={false} rowKey={(record) => record.id} diff --git a/ui/src/components/workflow/WorkflowRuns.tsx b/ui/src/components/workflow/WorkflowRuns.tsx index 2feace06..bdf256ed 100644 --- a/ui/src/components/workflow/WorkflowRuns.tsx +++ b/ui/src/components/workflow/WorkflowRuns.tsx @@ -11,6 +11,7 @@ import Empty from "@/components/Empty"; import WorkflowStatusTag from "@/components/workflow/WorkflowStatusTag"; import { WORKFLOW_TRIGGERS } from "@/domain/workflow"; import { WORKFLOW_RUN_STATUSES, type WorkflowRunModel } from "@/domain/workflowRun"; +import { useAppSettings } from "@/hooks"; import { list as listWorkflowRuns, remove as removeWorkflowRun, @@ -31,15 +32,19 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { const { modal, notification } = App.useApp(); - const [page, setPage] = useState(1); - const [pageSize, setPageSize] = useState(10); + const { appSettings: globalAppSettings } = useAppSettings(); + const [page, setPage] = useState(1); + const [pageSize, setPageSize] = useState(globalAppSettings.defaultPerPage!); + + const [tableData, setTableData] = useState([]); + const [tableTotal, setTableTotal] = useState(0); const tableColumns: TableProps["columns"] = [ { key: "$index", align: "center", fixed: "left", - width: 50, + width: 48, render: (_, __, index) => (page - 1) * pageSize + index + 1, }, { @@ -106,7 +111,7 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { return (
- +
); }, + onCell: () => { + return { + onClick: (e) => { + e.stopPropagation(); + }, + }; + }, }, ]; - const [tableData, setTableData] = useState([]); - const [tableTotal, setTableTotal] = useState(0); const { loading, @@ -206,6 +216,11 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { }; }, [tableData]); + const handlePaginationChange = (page: number, pageSize: number) => { + setPage(page); + setPageSize(pageSize); + }; + const { setData: setDetailRecord, setOpen: setDetailOpen, ...detailDrawerProps } = WorkflowRunDetailDrawer.useProps(); const handleRecordDetailClick = (workflowRun: WorkflowRunModel) => { @@ -259,7 +274,8 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { return (
- } showIcon type="info" /> + } showIcon type="info" /> + } showIcon type="info" /> columns={tableColumns} @@ -269,7 +285,11 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { emptyText: loading ? ( ) : ( - } /> + } + /> ), }} pagination={{ @@ -277,14 +297,8 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { pageSize: pageSize, total: tableTotal, showSizeChanger: true, - onChange: (page: number, pageSize: number) => { - setPage(page); - setPageSize(pageSize); - }, - onShowSizeChange: (page: number, pageSize: number) => { - setPage(page); - setPageSize(pageSize); - }, + onChange: handlePaginationChange, + onShowSizeChange: handlePaginationChange, }} rowClassName="cursor-pointer" rowKey={(record) => record.id} diff --git a/ui/src/i18n/locales/en/nls.access.json b/ui/src/i18n/locales/en/nls.access.json index 74738e15..0fef135e 100644 --- a/ui/src/i18n/locales/en/nls.access.json +++ b/ui/src/i18n/locales/en/nls.access.json @@ -4,7 +4,7 @@ "access.nodata": "No credentials", "access.nodata.title": "No credentials", - "access.nodata.description": "Add a credential to store authentication information.", + "access.nodata.description": "It looks like you don't have any credentials. Get started by adding one.", "access.nodata.button": "Create credential", "access.search.placeholder": "Search by credential name ...", diff --git a/ui/src/i18n/locales/en/nls.certificate.json b/ui/src/i18n/locales/en/nls.certificate.json index 52857b58..7f83da5e 100644 --- a/ui/src/i18n/locales/en/nls.certificate.json +++ b/ui/src/i18n/locales/en/nls.certificate.json @@ -3,7 +3,7 @@ "certificate.page.subtitle": "SSL certificates contain the website's public key and the website's identity, along with related information. They are generated from the execution output of workflows.", "certificate.nodata.title": "No Certificates", - "certificate.nodata.description": "Add a workflow to generate certificates!", + "certificate.nodata.description": "It looks like you don't have any certificates. Get started by running a workflow.", "certificate.nodata.button": "Go to workflows", "certificate.search.placeholder": "Search by certificate name or serial number ...", diff --git a/ui/src/i18n/locales/en/nls.common.json b/ui/src/i18n/locales/en/nls.common.json index 4b4ed297..41be6024 100644 --- a/ui/src/i18n/locales/en/nls.common.json +++ b/ui/src/i18n/locales/en/nls.common.json @@ -6,7 +6,6 @@ "common.button.copy": "Copy", "common.button.delete": "Delete", "common.button.download": "Download", - "common.button.duplicate": "Duplicate", "common.button.edit": "Edit", "common.button.more": "More", "common.button.ok": "Ok", diff --git a/ui/src/i18n/locales/en/nls.dashboard.json b/ui/src/i18n/locales/en/nls.dashboard.json index cee19401..123ac884 100644 --- a/ui/src/i18n/locales/en/nls.dashboard.json +++ b/ui/src/i18n/locales/en/nls.dashboard.json @@ -6,9 +6,10 @@ "dashboard.statistics.expired_certificates": "Expired certificates", "dashboard.statistics.all_workflows": "All workflows", "dashboard.statistics.enabled_workflows": "Active workflows", - "dashboard.statistics.unit": "", "dashboard.latest_workflow_runs": "Latest workflow runs", + "dashboard.latest_workflow_runs.nodata.description": "It looks like you don't have any runs. Get started by running a workflow.", + "dashboard.latest_workflow_runs.nodata.button": "Go to workflows", "dashboard.quick_actions": "Quick actions", "dashboard.quick_actions.create_workflow": "Create workflow", diff --git a/ui/src/i18n/locales/en/nls.provider.json b/ui/src/i18n/locales/en/nls.provider.json index 05e9bcdf..86a33465 100644 --- a/ui/src/i18n/locales/en/nls.provider.json +++ b/ui/src/i18n/locales/en/nls.provider.json @@ -41,9 +41,9 @@ "provider.baiducloud.dns": "Baidu Cloud - DNS", "provider.baishan": "Baishan", "provider.baishan.cdn": "Baishan - CDN (Content Delivery Network)", - "provider.baotapanel": "aaPanel (aka BaoTaPanel)", - "provider.baotapanel.console": "aaPanel (aka BaoTaPanel) - Console", - "provider.baotapanel.site": "aaPanel (aka BaoTaPanel) - Website", + "provider.baotapanel": "aaPanel (aka BaotaPanel)", + "provider.baotapanel.console": "aaPanel (aka BaotaPanel) - Console", + "provider.baotapanel.site": "aaPanel (aka BaotaPanel) - Website", "provider.baotawaf": "aaWAF (aka BaotaWAF)", "provider.baotawaf.console": "aaWAF (aka BaotaWAF) - Console", "provider.baotawaf.site": "aaWAF (aka BaotaWAF) - Website", diff --git a/ui/src/i18n/locales/en/nls.settings.json b/ui/src/i18n/locales/en/nls.settings.json index 563c421a..72846247 100644 --- a/ui/src/i18n/locales/en/nls.settings.json +++ b/ui/src/i18n/locales/en/nls.settings.json @@ -32,7 +32,7 @@ "settings.sslprovider.tab": "Certificate authority", "settings.sslprovider.ca.title": "System-wide CA", - "settings.sslprovider.ca.tips": "You can set different CAs for each workflow as well.
The certificate validity lifetime, certificate algorithm, domain names count, and support for wildcard domain names are allowed may vary among different providers. After switching service providers, please check whether the configuration of the workflows needs to be adjusted.", + "settings.sslprovider.ca.tips": "You can use different CAs for each workflow as well. If you want to do this, please visit the credentials page.
The certificate validity lifetime, certificate algorithm, domain names count, and support for wildcard domain names are allowed may vary among different providers. After switching service providers, please check whether the configuration of the workflows needs to be adjusted.", "settings.sslprovider.form.provider.label": "ACME CA provider", "settings.sslprovider.form.letsencryptstaging_alert": "The staging environment can reduce the chance of your running up against rate limits.

Learn more:
https://letsencrypt.org/docs/staging-environment/", "settings.sslprovider.form.zerossl_eab_kid.label": "EAB KID", diff --git a/ui/src/i18n/locales/en/nls.workflow.nodes.json b/ui/src/i18n/locales/en/nls.workflow.nodes.json index 7f300eca..200e1a48 100644 --- a/ui/src/i18n/locales/en/nls.workflow.nodes.json +++ b/ui/src/i18n/locales/en/nls.workflow.nodes.json @@ -926,7 +926,7 @@ "workflow_node.deploy.form.webhook_data.label": "Webhook data (Optional)", "workflow_node.deploy.form.webhook_data.placeholder": "Please enter Webhook data to override the default value", "workflow_node.deploy.form.webhook_data.tooltip": "Leave it blank to use the default Webhook data provided by the credential.", - "workflow_node.deploy.form.webhook_data.guide": "
Supported variables:
  1. ${DOMAIN}: The primary domain of the certificate (CommonName).
  2. ${DOMAINS}: The domain list of the certificate (SubjectAltNames).
  3. ${CERTIFICATE}: The PEM format content of the certificate file.
  4. ${SERVER_CERTIFICATE}: The PEM format content of the server certificate file.
  5. ${INTERMEDIA_CERTIFICATE}: The PEM format content of the intermediate CA certificate file.
  6. ${PRIVATE_KEY}: The PEM format content of the private key file.

Please visit the authorization management page for addtional notes.", + "workflow_node.deploy.form.webhook_data.guide": "
Supported variables:
  1. ${DOMAIN}: The primary domain of the certificate (CommonName).
  2. ${DOMAINS}: The domain list of the certificate (SubjectAltNames).
  3. ${CERTIFICATE}: The PEM format content of the certificate file.
  4. ${SERVER_CERTIFICATE}: The PEM format content of the server certificate file.
  5. ${INTERMEDIA_CERTIFICATE}: The PEM format content of the intermediate CA certificate file.
  6. ${PRIVATE_KEY}: The PEM format content of the private key file.

Please visit the credentials page for addtional notes.", "workflow_node.deploy.form.webhook_data.errmsg.json_invalid": "Please enter a valiod JSON string", "workflow_node.deploy.form.strategy_config.label": "Strategy settings", "workflow_node.deploy.form.skip_on_last_succeeded.label": "Repeated deployment", @@ -977,7 +977,7 @@ "workflow_node.notify.form.webhook_data.label": "Webhook data (Optional)", "workflow_node.notify.form.webhook_data.placeholder": "Please enter Webhook data to override the default value", "workflow_node.notify.form.webhook_data.tooltip": "Leave it blank to use the default Webhook data provided by the credential.", - "workflow_node.notify.form.webhook_data.guide": "
Supported variables:
  1. ${SUBJECT}: The subject of notification.
  2. ${MESSAGE}: The message of notification.

Please visit the authorization management page for addtional notes.", + "workflow_node.notify.form.webhook_data.guide": "
Supported variables:
  1. ${SUBJECT}: The subject of notification.
  2. ${MESSAGE}: The message of notification.

Please visit the credentials page for addtional notes.", "workflow_node.notify.form.webhook_data.errmsg.json_invalid": "Please enter a valiod JSON string", "workflow_node.notify.form.strategy_config.label": "Strategy settings", "workflow_node.notify.form.skip_on_all_prev_skipped.label": "Silent behavior", diff --git a/ui/src/i18n/locales/en/nls.workflow.runs.json b/ui/src/i18n/locales/en/nls.workflow.runs.json index 0f240d12..8223cee3 100644 --- a/ui/src/i18n/locales/en/nls.workflow.runs.json +++ b/ui/src/i18n/locales/en/nls.workflow.runs.json @@ -1,11 +1,16 @@ { - "workflow_run.action.cancel.button": "Cancel", + "workflow_run.action.view.button": "View details", + "workflow_run.action.cancel.button": "Cancel workflow run", "workflow_run.action.cancel.modal.title": "Cancel run", "workflow_run.action.cancel.modal.content": "Are you sure to cancel this run?", + "workflow_run.action.delete.button": "Delete workflow run", "workflow_run.action.delete.modal.title": "Delete \"{{name}}\"", "workflow_run.action.delete.modal.content": "Are you sure want to delete this workflow run?
This action cannot be undone.", - "workflow_run.table.alert": "The workflow run contains the execution results of each node. Deleting it may trigger re-application or re-deployment of certificates due to the inability to find the previous execution result. Please do not delete unless necessary. It is recommended to keep it for at least 180 days.", + "workflow_run.deletion.alert": "The workflow run contains the execution results of each node. Deleting it may trigger re-application or re-deployment of certificates due to the inability to find the previous execution result. Please do not delete unless necessary. It is recommended to keep it for at least 180 days. ", + "workflow_run.cancellation.alert": "If the process is unexpectedly terminated or the server times out, you can manually cancel long-hanging runs to prevent blocking subsequent executions.", + + "workflow_run.nodata.description": "It looks like you don't have any runs. Get started by running this workflow.", "workflow_run.props.id": "ID", "workflow_run.props.status": "Status", diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index e09ea1a2..8bc462f7 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -1,9 +1,9 @@ { - "access.page.title": "授权管理", - "access.page.subtitle": "授权中存储有用于访问特定第三方应用程序或服务的身份验证信息(如账号密码、API 密钥、OAuth 令牌等)。", + "access.page.title": "授权凭据", + "access.page.subtitle": "授权凭据中存储有用于访问特定第三方应用程序或服务的身份验证信息(如账号密码、API 密钥、OAuth 令牌等)。", "access.nodata.title": "暂无授权", - "access.nodata.description": "新建一个授权并存储身份验证信息吧~", + "access.nodata.description": "当前未找到授权信息。请先创建。", "access.nodata.button": "新建授权", "access.search.placeholder": "按授权名称搜索……", diff --git a/ui/src/i18n/locales/zh/nls.certificate.json b/ui/src/i18n/locales/zh/nls.certificate.json index 57a8fd6b..55dc7735 100644 --- a/ui/src/i18n/locales/zh/nls.certificate.json +++ b/ui/src/i18n/locales/zh/nls.certificate.json @@ -1,9 +1,9 @@ { - "certificate.page.title": "证书管理", + "certificate.page.title": "SSL 证书", "certificate.page.subtitle": "SSL 证书含有网站的公钥和网站标识以及其他相关信息。它们来自于工作流的执行输出。", "certificate.nodata.title": "暂无证书", - "certificate.nodata.description": "新建一个工作流去生成证书吧~", + "certificate.nodata.description": "当前未找到任何认证。请先运行一个工作流以生成证书。", "certificate.nodata.button": "前往工作流", "certificate.search.placeholder": "按证书名称或序列号搜索……", diff --git a/ui/src/i18n/locales/zh/nls.common.json b/ui/src/i18n/locales/zh/nls.common.json index 06f16397..f55239c6 100644 --- a/ui/src/i18n/locales/zh/nls.common.json +++ b/ui/src/i18n/locales/zh/nls.common.json @@ -6,7 +6,6 @@ "common.button.copy": "复制", "common.button.delete": "刪除", "common.button.download": "下载", - "common.button.duplicate": "复制", "common.button.edit": "编辑", "common.button.more": "更多", "common.button.ok": "确定", diff --git a/ui/src/i18n/locales/zh/nls.dashboard.json b/ui/src/i18n/locales/zh/nls.dashboard.json index f3c34cb3..53ef62e7 100644 --- a/ui/src/i18n/locales/zh/nls.dashboard.json +++ b/ui/src/i18n/locales/zh/nls.dashboard.json @@ -6,9 +6,10 @@ "dashboard.statistics.expired_certificates": "已过期证书", "dashboard.statistics.all_workflows": "所有工作流", "dashboard.statistics.enabled_workflows": "已启用工作流", - "dashboard.statistics.unit": "个", "dashboard.latest_workflow_runs": "最近执行的工作流", + "dashboard.latest_workflow_runs.nodata.description": "当前未找到任何工作流执行记录。请先运行一个工作流。", + "dashboard.latest_workflow_runs.nodata.button": "前往工作流", "dashboard.quick_actions": "快捷操作", "dashboard.quick_actions.create_workflow": "新建工作流", diff --git a/ui/src/i18n/locales/zh/nls.settings.json b/ui/src/i18n/locales/zh/nls.settings.json index 6b5148d0..022e8763 100644 --- a/ui/src/i18n/locales/zh/nls.settings.json +++ b/ui/src/i18n/locales/zh/nls.settings.json @@ -32,7 +32,7 @@ "settings.sslprovider.tab": "证书颁发机构", "settings.sslprovider.ca.title": "全局证书颁发机构", - "settings.sslprovider.ca.tips": "你也可以在每个工作流中设置不同的证书颁发机构。
不同服务商所支持的证书有效期、证书算法、多域名数量上限、是否允许泛域名等可能不同,切换服务商后请注意检查已有工作流的配置是否需要调整。", + "settings.sslprovider.ca.tips": "如果你希望为在每个工作流中使用不同的证书颁发机构,请前往授权凭据页面。
不同服务商所支持的证书有效期、证书算法、多域名数量上限、是否允许泛域名等可能不同,切换服务商后请注意检查已有工作流的配置是否需要调整。", "settings.sslprovider.form.provider.label": "证书颁发机构提供商", "settings.sslprovider.form.letsencryptstaging_alert": "测试环境比生产环境有更宽松的速率限制,可进行测试性部署。

点击下方链接了解更多:
https://letsencrypt.org/zh-cn/docs/staging-environment/", "settings.sslprovider.form.zerossl_eab_kid.label": "EAB KID", diff --git a/ui/src/i18n/locales/zh/nls.workflow.json b/ui/src/i18n/locales/zh/nls.workflow.json index e5221801..ff5e103c 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.json +++ b/ui/src/i18n/locales/zh/nls.workflow.json @@ -3,7 +3,7 @@ "workflow.page.subtitle": "工作流是自动化流程的节点集合。当满足触发条件时,工作流开始顺序执行各节点以完成复杂的任务。", "workflow.nodata.title": "暂无工作流", - "workflow.nodata.description": "请先新建工作流以执行证书申请、部署等任务", + "workflow.nodata.description": "当前未找到工作流。请先创建。", "workflow.nodata.button": "新建工作流", "workflow.search.placeholder": "按工作流名称搜索……", diff --git a/ui/src/i18n/locales/zh/nls.workflow.nodes.json b/ui/src/i18n/locales/zh/nls.workflow.nodes.json index 54bb7175..572ca55d 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.nodes.json +++ b/ui/src/i18n/locales/zh/nls.workflow.nodes.json @@ -924,7 +924,7 @@ "workflow_node.deploy.form.webhook_data.label": "Webhook 回调数据(可选)", "workflow_node.deploy.form.webhook_data.placeholder": "请输入 Webhook 回调数据以覆盖默认值", "workflow_node.deploy.form.webhook_data.tooltip": "不填写时,将使用所选部署目标授权的默认 Webhook 回调数据。", - "workflow_node.deploy.form.webhook_data.guide": "
支持的变量:
  1. ${DOMAIN}:证书的主域名(即 CommonName)。
  2. ${DOMAINS}:证书的多域名列表(即 SubjectAltNames)。
  3. ${CERTIFICATE}:证书文件 PEM 格式内容。
  4. ${SERVER_CERTIFICATE}:证书文件(仅含服务器证书)PEM 格式内容。
  5. ${INTERMEDIA_CERTIFICATE}:证书文件(仅含中间证书)PEM 格式内容。
  6. ${PRIVATE_KEY}:私钥文件 PEM 格式内容。

其他注意事项请前往授权管理页面查看。", + "workflow_node.deploy.form.webhook_data.guide": "
支持的变量:
  1. ${DOMAIN}:证书的主域名(即 CommonName)。
  2. ${DOMAINS}:证书的多域名列表(即 SubjectAltNames)。
  3. ${CERTIFICATE}:证书文件 PEM 格式内容。
  4. ${SERVER_CERTIFICATE}:证书文件(仅含服务器证书)PEM 格式内容。
  5. ${INTERMEDIA_CERTIFICATE}:证书文件(仅含中间证书)PEM 格式内容。
  6. ${PRIVATE_KEY}:私钥文件 PEM 格式内容。

其他注意事项请前往授权凭据页面查看。", "workflow_node.deploy.form.webhook_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串", "workflow_node.deploy.form.strategy_config.label": "执行策略", "workflow_node.deploy.form.skip_on_last_succeeded.label": "重复部署", @@ -975,7 +975,7 @@ "workflow_node.notify.form.webhook_data.label": "Webhook 回调数据(可选)", "workflow_node.notify.form.webhook_data.placeholder": "请输入 Webhook 回调数据以覆盖默认值", "workflow_node.notify.form.webhook_data.tooltip": "不填写时,将使用所选部署目标授权的默认 Webhook 回调数据。", - "workflow_node.notify.form.webhook_data.guide": "
支持的变量:
  1. ${SUBJECT}:通知主题。
  2. ${MESSAGE}:通知内容。

其他注意事项请前往授权管理页面查看。", + "workflow_node.notify.form.webhook_data.guide": "
支持的变量:
  1. ${SUBJECT}:通知主题。
  2. ${MESSAGE}:通知内容。

其他注意事项请前往授权凭据页面查看。", "workflow_node.notify.form.webhook_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串", "workflow_node.notify.form.strategy_config.label": "执行策略", "workflow_node.notify.form.skip_on_all_prev_skipped.label": "静默行为", diff --git a/ui/src/i18n/locales/zh/nls.workflow.runs.json b/ui/src/i18n/locales/zh/nls.workflow.runs.json index c6cb10f5..bbe3e856 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.runs.json +++ b/ui/src/i18n/locales/zh/nls.workflow.runs.json @@ -1,11 +1,16 @@ { + "workflow_run.action.view.button": "查看详情", "workflow_run.action.cancel.button": "取消执行", "workflow_run.action.cancel.modal.title": "取消执行", "workflow_run.action.cancel.modal.content": "确定要取消此执行吗?此操作仅中止流程,但不会回滚已执行的节点。", + "workflow_run.action.delete.button": "删除执行", "workflow_run.action.delete.modal.title": "删除执行「{{name}}」", "workflow_run.action.delete.modal.content": "确定要删除该工作流执行记录吗?删除后仅会清除日志历史,但不会影响签发的证书。
注意此操作不可撤销,请谨慎操作。", - "workflow_run.table.alert": "执行记录中包含工作流各节点的执行结果,删除后可能导致因找不到前次执行结果而触发重新申请或部署证书。如无必要请勿提前删除,建议保留至少 180 天。", + "workflow_run.deletion.alert": "执行记录中包含工作流各节点的执行结果,删除后可能导致因找不到前次执行结果而触发重新申请或部署证书。如无必要请勿提前删除,建议保留至少 180 天。", + "workflow_run.cancellation.alert": "如遇进程意外中止、服务器超时等原因,你可以手动取消长时间挂起的执行,避免阻塞后续执行。", + + "workflow_run.nodata.description": "当前未找到任何执行记录。请先运行此工作流。", "workflow_run.props.id": "ID", "workflow_run.props.status": "状态", diff --git a/ui/src/pages/accesses/AccessList.tsx b/ui/src/pages/accesses/AccessList.tsx index c64be2e7..f4248120 100644 --- a/ui/src/pages/accesses/AccessList.tsx +++ b/ui/src/pages/accesses/AccessList.tsx @@ -78,63 +78,63 @@ const AccessList = () => { fixed: "right", width: 64, render: (_, record) => ( -
{ - e.stopPropagation(); + + + + ), + onClick: () => { + handleRecordDetailClick(record); + }, + }, + { + key: "duplicate", + label: t("access.action.duplicate.button"), + icon: ( + + + + ), + onClick: () => { + handleRecordDuplicateClick(record); + }, + }, + { + type: "divider", + }, + { + key: "delete", + label: t("access.action.delete.button"), + danger: true, + icon: ( + + + + ), + onClick: () => { + handleRecordDeleteClick(record); + }, + }, + ], }} + trigger={["click"]} > - - - - ), - onClick: () => { - handleRecordDetailClick(record); - }, - }, - { - key: "duplicate", - label: t("access.action.duplicate.button"), - icon: ( - - - - ), - onClick: () => { - handleRecordDuplicateClick(record); - }, - }, - { - type: "divider", - }, - { - key: "delete", - label: t("access.action.delete.button"), - danger: true, - icon: ( - - - - ), - onClick: () => { - handleRecordDeleteClick(record); - }, - }, - ], - }} - trigger={["click"]} - > -
+
+ - + ) : ( + + ) + } + /> + ), }} pagination={false} rowClassName="cursor-pointer" @@ -310,7 +378,7 @@ const WorkflowRunHistoryTable = () => { /> - +
); }; diff --git a/ui/src/pages/workflows/WorkflowDetail.tsx b/ui/src/pages/workflows/WorkflowDetail.tsx index b609635b..66e40408 100644 --- a/ui/src/pages/workflows/WorkflowDetail.tsx +++ b/ui/src/pages/workflows/WorkflowDetail.tsx @@ -2,7 +2,7 @@ import { useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate, useParams } from "react-router-dom"; import { IconArrowBackUp, IconChevronDown, IconDots, IconHistory, IconPlayerPlay, IconRobot, IconTrash } from "@tabler/icons-react"; -import { Alert, App, Button, Card, Dropdown, Flex, Form, Input, Segmented, Space, Tabs } from "antd"; +import { Alert, App, Button, Card, Dropdown, Flex, Form, Input, Segmented, Space } from "antd"; import { createSchemaFieldRule } from "antd-zod"; import { isEqual } from "radash"; import { z } from "zod"; diff --git a/ui/src/pages/workflows/WorkflowList.tsx b/ui/src/pages/workflows/WorkflowList.tsx index 82455b94..06023d6c 100644 --- a/ui/src/pages/workflows/WorkflowList.tsx +++ b/ui/src/pages/workflows/WorkflowList.tsx @@ -124,63 +124,63 @@ const WorkflowList = () => { fixed: "right", width: 64, render: (_, record) => ( -
{ - e.stopPropagation(); + + + + ), + onClick: () => { + handleRecordDetailClick(record); + }, + }, + { + key: "duplicate", + label: t("workflow.action.duplicate.button"), + icon: ( + + + + ), + onClick: () => { + handleRecordDuplicateClick(record); + }, + }, + { + type: "divider", + }, + { + key: "delete", + label: t("workflow.action.delete.button"), + danger: true, + icon: ( + + + + ), + onClick: () => { + handleRecordDeleteClick(record); + }, + }, + ], }} + trigger={["click"]} > - - - - ), - onClick: () => { - handleRecordDetailClick(record); - }, - }, - { - key: "duplicate", - label: t("workflow.action.duplicate.button"), - icon: ( - - - - ), - onClick: () => { - handleRecordDuplicateClick(record); - }, - }, - { - type: "divider", - }, - { - key: "delete", - label: t("workflow.action.delete.button"), - danger: true, - icon: ( - - - - ), - onClick: () => { - handleRecordDeleteClick(record); - }, - }, - ], - }} - trigger={["click"]} - > -
+