From 26028bb1ebac806868f5adc25a305e19035cb6fe Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 3 Apr 2025 20:30:44 +0800 Subject: [PATCH 1/6] chore(ui): improve i18n --- ui/src/i18n/locales/en/nls.settings.json | 14 +++++++------- ui/src/i18n/locales/zh/nls.common.json | 2 +- ui/src/i18n/locales/zh/nls.settings.json | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ui/src/i18n/locales/en/nls.settings.json b/ui/src/i18n/locales/en/nls.settings.json index d436665c..85c17f49 100644 --- a/ui/src/i18n/locales/en/nls.settings.json +++ b/ui/src/i18n/locales/en/nls.settings.json @@ -53,21 +53,21 @@ "settings.notification.channel.form.email_sender_address.placeholder": "Please enter sender email address", "settings.notification.channel.form.email_receiver_address.label": "Receiver email address", "settings.notification.channel.form.email_receiver_address.placeholder": "Please enter receiver email address", - "settings.notification.channel.form.gotify_url.placeholder": "Please enter Service URL", "settings.notification.channel.form.gotify_url.label": "Service URL", - "settings.notification.channel.form.gotify_url.tooltip": "Example: https://gotify.exmaple.com, the protocol needs to be included but the trailing '/' should not be included.
For more information, see https://gotify.net/docs/pushmsg", - "settings.notification.channel.form.gotify_token.placeholder": "Please enter Application Token", - "settings.notification.channel.form.gotify_token.label": "Application Token", + "settings.notification.channel.form.gotify_url.placeholder": "Please enter Service URL", + "settings.notification.channel.form.gotify_url.tooltip": "For more information, see https://gotify.net/docs/pushmsg

Example: https://gotify.exmaple.com, the trailing '/' should not be included.", + "settings.notification.channel.form.gotify_token.label": "Application token", + "settings.notification.channel.form.gotify_token.placeholder": "Please enter Application token", "settings.notification.channel.form.gotify_token.tooltip": "For more information, see https://gotify.net/docs/pushmsg", "settings.notification.channel.form.gotify_priority.placeholder": "Please enter message priority", - "settings.notification.channel.form.gotify_priority.label": "Message Priority", - "settings.notification.channel.form.gotify_priority.tooltip": "Message Priority, you can set it to 1 as default.
For more information, see https://gotify.net/docs/pushmsg
https://github.com/gotify/android/issues/18#issuecomment-437403888", + "settings.notification.channel.form.gotify_priority.label": "Message priority", + "settings.notification.channel.form.gotify_priority.tooltip": "For more information, see https://gotify.net/docs/pushmsg, https://github.com/gotify/android/issues/18#issuecomment-437403888", "settings.notification.channel.form.gotify_priority.error.gte0": "Message Priority must be greater than or equal to 0.", "settings.notification.channel.form.lark_webhook_url.label": "Webhook URL", "settings.notification.channel.form.lark_webhook_url.placeholder": "Please enter Webhook URL", "settings.notification.channel.form.lark_webhook_url.tooltip": "For more information, see https://www.feishu.cn/hc/en-US/articles/807992406756", - "settings.notification.channel.form.pushplus_token.placeholder": "Please enter Token", "settings.notification.channel.form.pushplus_token.label": "Token", + "settings.notification.channel.form.pushplus_token.placeholder": "Please enter token", "settings.notification.channel.form.pushplus_token.tooltip": "For more information, see https://www.pushplus.plus/push1.html", "settings.notification.channel.form.serverchan_url.label": "Server URL", "settings.notification.channel.form.serverchan_url.placeholder": "Please enter ServerChan server URL (e.g. https://sctapi.ftqq.com/*****.send)", diff --git a/ui/src/i18n/locales/zh/nls.common.json b/ui/src/i18n/locales/zh/nls.common.json index 726c5ca2..4f279ba0 100644 --- a/ui/src/i18n/locales/zh/nls.common.json +++ b/ui/src/i18n/locales/zh/nls.common.json @@ -41,7 +41,7 @@ "common.notifier.email": "邮件", "common.notifier.gotify": "Gotify", "common.notifier.lark": "飞书", - "common.notifier.pushplus": "PushPlus推送加", + "common.notifier.pushplus": "PushPlus 推送加", "common.notifier.serverchan": "Server 酱", "common.notifier.telegram": "Telegram", "common.notifier.webhook": "Webhook", diff --git a/ui/src/i18n/locales/zh/nls.settings.json b/ui/src/i18n/locales/zh/nls.settings.json index c00d158a..292a5704 100644 --- a/ui/src/i18n/locales/zh/nls.settings.json +++ b/ui/src/i18n/locales/zh/nls.settings.json @@ -53,22 +53,22 @@ "settings.notification.channel.form.email_sender_address.placeholder": "请输入发送邮箱地址", "settings.notification.channel.form.email_receiver_address.label": "接收邮箱地址", "settings.notification.channel.form.email_receiver_address.placeholder": "请输入接收邮箱地址", - "settings.notification.channel.form.gotify_url.placeholder": "请输入服务地址", "settings.notification.channel.form.gotify_url.label": "服务地址", - "settings.notification.channel.form.gotify_url.tooltip": "示例: https://gotify.exmaple.com,需要包含协议但不要包含末尾的'/'。
请参阅 https://gotify.net/docs/pushmsg", - "settings.notification.channel.form.gotify_token.placeholder": "请输入应用Token", - "settings.notification.channel.form.gotify_token.label": "应用Token", - "settings.notification.channel.form.gotify_token.tooltip": "应用Token。
请参阅 https://gotify.net/docs/pushmsg", + "settings.notification.channel.form.gotify_url.placeholder": "请输入服务地址", + "settings.notification.channel.form.gotify_url.tooltip": "这是什么?请参阅 https://gotify.net/docs/pushmsg

示例: https://gotify.exmaple.com,不要包含末尾的'/'。", + "settings.notification.channel.form.gotify_token.label": "应用 Token", + "settings.notification.channel.form.gotify_token.placeholder": "请输入应用 Token", + "settings.notification.channel.form.gotify_token.tooltip": "这是什么?请参阅 https://gotify.net/docs/pushmsg", + "settings.notification.channel.form.gotify_priority.label": "消息优先级(可选)", "settings.notification.channel.form.gotify_priority.placeholder": "请输入消息优先级", - "settings.notification.channel.form.gotify_priority.label": "消息优先级", - "settings.notification.channel.form.gotify_priority.tooltip": "消息优先级, 可以设置为1作为默认值。
请参阅 https://gotify.net/docs/pushmsg
https://github.com/gotify/android/issues/18#issuecomment-437403888", - "settings.notification.channel.form.gotify_priority.error.gte0": "消息优先级需要大于等于0", + "settings.notification.channel.form.gotify_priority.tooltip": "这是什么?请参阅 https://gotify.net/docs/pushmsghttps://github.com/gotify/android/issues/18#issuecomment-437403888", + "settings.notification.channel.form.gotify_priority.error.gte0": "消息优先级需要大于等于 0", "settings.notification.channel.form.lark_webhook_url.label": "机器人 Webhook 地址", "settings.notification.channel.form.lark_webhook_url.placeholder": "请输入机器人 Webhook 地址", "settings.notification.channel.form.lark_webhook_url.tooltip": "这是什么?请参阅 https://www.feishu.cn/hc/zh-CN/articles/807992406756", - "settings.notification.channel.form.pushplus_token.placeholder": "请输入Token", "settings.notification.channel.form.pushplus_token.label": "Token", - "settings.notification.channel.form.pushplus_token.tooltip": "请参阅 https://www.pushplus.plus/push1.html", + "settings.notification.channel.form.pushplus_token.placeholder": "请输入 Token", + "settings.notification.channel.form.pushplus_token.tooltip": "这是什么?请参阅 https://www.pushplus.plus/push1.html", "settings.notification.channel.form.serverchan_url.label": "服务器地址", "settings.notification.channel.form.serverchan_url.placeholder": "请输入服务器地址(形如: https://sctapi.ftqq.com/*****.send)", "settings.notification.channel.form.serverchan_url.tooltip": "这是什么?请参阅 https://sct.ftqq.com/forward", From 6ff738144aa34215ef12b1a945145de4304f3957 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 3 Apr 2025 20:33:58 +0800 Subject: [PATCH 2/6] fix: #585 #586 --- .../core/deployer/providers/volcengine-alb/volcengine_alb.go | 2 +- .../core/deployer/providers/volcengine-clb/volcengine_clb.go | 2 +- .../workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx | 2 +- .../workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/pkg/core/deployer/providers/volcengine-alb/volcengine_alb.go b/internal/pkg/core/deployer/providers/volcengine-alb/volcengine_alb.go index 0c6ba1b4..ceba0952 100644 --- a/internal/pkg/core/deployer/providers/volcengine-alb/volcengine_alb.go +++ b/internal/pkg/core/deployer/providers/volcengine-alb/volcengine_alb.go @@ -182,7 +182,7 @@ func (d *DeployerProvider) deployToListener(ctx context.Context, cloudCertId str return errors.New("config `listenerId` is required") } - if err := d.updateListenerCertificate(ctx, d.config.LoadbalancerId, cloudCertId); err != nil { + if err := d.updateListenerCertificate(ctx, d.config.ListenerId, cloudCertId); err != nil { return err } diff --git a/internal/pkg/core/deployer/providers/volcengine-clb/volcengine_clb.go b/internal/pkg/core/deployer/providers/volcengine-clb/volcengine_clb.go index 37481a3f..752b0f85 100644 --- a/internal/pkg/core/deployer/providers/volcengine-clb/volcengine_clb.go +++ b/internal/pkg/core/deployer/providers/volcengine-clb/volcengine_clb.go @@ -178,7 +178,7 @@ func (d *DeployerProvider) deployToListener(ctx context.Context, cloudCertId str return errors.New("config `listenerId` is required") } - if err := d.updateListenerCertificate(ctx, d.config.LoadbalancerId, cloudCertId); err != nil { + if err := d.updateListenerCertificate(ctx, d.config.ListenerId, cloudCertId); err != nil { return err } diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx index d831fd7f..348f4d8d 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx @@ -113,7 +113,7 @@ const DeployNodeConfigFormVolcEngineALBConfig = ({ } diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx index c3ddfd03..99263044 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx @@ -104,7 +104,7 @@ const DeployNodeConfigFormVolcEngineCLBConfig = ({ } From 47c4ba9dd6f9b745d3054882cda9ce85bbf180a1 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 5 Apr 2025 21:23:55 +0800 Subject: [PATCH 3/6] feat(ui): workflow runs deleting warning --- ui/src/components/workflow/WorkflowRuns.tsx | 4 +++- ui/src/i18n/locales/en/nls.workflow.runs.json | 2 ++ ui/src/i18n/locales/zh/nls.workflow.runs.json | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/components/workflow/WorkflowRuns.tsx b/ui/src/components/workflow/WorkflowRuns.tsx index 25f3891a..718a7913 100644 --- a/ui/src/components/workflow/WorkflowRuns.tsx +++ b/ui/src/components/workflow/WorkflowRuns.tsx @@ -11,7 +11,7 @@ import { SyncOutlined as SyncOutlinedIcon, } from "@ant-design/icons"; import { useRequest } from "ahooks"; -import { Button, Empty, Modal, Space, Table, type TableProps, Tag, Tooltip, notification } from "antd"; +import { Alert, Button, Empty, Modal, Space, Table, type TableProps, Tag, Tooltip, notification } from "antd"; import dayjs from "dayjs"; import { ClientResponseError } from "pocketbase"; @@ -284,6 +284,8 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { {NotificationContextHolder}
+ } /> + columns={tableColumns} dataSource={tableData} diff --git a/ui/src/i18n/locales/en/nls.workflow.runs.json b/ui/src/i18n/locales/en/nls.workflow.runs.json index c48e54b7..551a1e90 100644 --- a/ui/src/i18n/locales/en/nls.workflow.runs.json +++ b/ui/src/i18n/locales/en/nls.workflow.runs.json @@ -5,6 +5,8 @@ "workflow_run.action.delete": "Delete run", "workflow_run.action.delete.confirm": "Are you sure to delete this run?", + "workflow_run.table.alert": "Attention: 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.props.id": "ID", "workflow_run.props.status": "Status", "workflow_run.props.status.pending": "Pending", diff --git a/ui/src/i18n/locales/zh/nls.workflow.runs.json b/ui/src/i18n/locales/zh/nls.workflow.runs.json index ce3ac15d..4f8640e6 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.runs.json +++ b/ui/src/i18n/locales/zh/nls.workflow.runs.json @@ -5,6 +5,8 @@ "workflow_run.action.delete": "删除执行", "workflow_run.action.delete.confirm": "确定要删除此执行吗?请注意此操作仅清除日志历史,但不会影响签发的证书。", + "workflow_run.table.alert": "注意:执行记录中包含工作流各节点的执行结果,删除后可能导致因找不到前次执行结果而触发重新申请或部署证书。如无必要请勿提前删除,建议保留至少 180 天。", + "workflow_run.props.id": "ID", "workflow_run.props.status": "状态", "workflow_run.props.status.pending": "等待执行", From 111ef97d9ce957464d1f67643b2e1d3e35bd7682 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 7 Apr 2025 15:31:20 +0800 Subject: [PATCH 4/6] fix: migration error --- migrations/1742209200_upgrade.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/migrations/1742209200_upgrade.go b/migrations/1742209200_upgrade.go index d2ed7f9d..da509468 100644 --- a/migrations/1742209200_upgrade.go +++ b/migrations/1742209200_upgrade.go @@ -258,15 +258,14 @@ func init() { } type dWorkflowNode struct { - Id string `json:"id"` - Type string `json:"type"` - Name string `json:"name"` - Config map[string]any `json:"config"` - Inputs map[string]any `json:"inputs"` - Outputs map[string]any `json:"outputs"` - Next *dWorkflowNode `json:"next,omitempty"` - Branches []dWorkflowNode `json:"branches,omitempty"` - Validated bool `json:"validated"` + Id string `json:"id"` + Type string `json:"type"` + Name string `json:"name"` + Inputs []map[string]any `json:"inputs"` + Outputs []map[string]any `json:"outputs"` + Next *dWorkflowNode `json:"next,omitempty"` + Branches []dWorkflowNode `json:"branches,omitempty"` + Validated bool `json:"validated"` } for _, workflowRun := range workflowRuns { From 37b9ae30e2259b44578d566021bedbd79285c541 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 8 Apr 2025 09:41:16 +0800 Subject: [PATCH 5/6] fix: #595 --- .../core/deployer/providers/gcore-cdn/gcore_cdn.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/pkg/core/deployer/providers/gcore-cdn/gcore_cdn.go b/internal/pkg/core/deployer/providers/gcore-cdn/gcore_cdn.go index a4d1c33e..c0a9e5ba 100644 --- a/internal/pkg/core/deployer/providers/gcore-cdn/gcore_cdn.go +++ b/internal/pkg/core/deployer/providers/gcore-cdn/gcore_cdn.go @@ -100,9 +100,15 @@ func (d *DeployerProvider) Deploy(ctx context.Context, certPem string, privkeyPe SSlEnabled: true, SSLData: int(updateResourceCertId), ProxySSLEnabled: getResourceResp.ProxySSLEnabled, - ProxySSLCA: &getResourceResp.ProxySSLCA, - ProxySSLData: &getResourceResp.ProxySSLData, - Options: getResourceResp.Options, + } + if getResourceResp.ProxySSLCA != 0 { + updateResourceReq.ProxySSLCA = &getResourceResp.ProxySSLCA + } + if getResourceResp.ProxySSLData != 0 { + updateResourceReq.ProxySSLData = &getResourceResp.ProxySSLData + } + if getResourceResp.Options != nil { + updateResourceReq.Options = getResourceResp.Options } updateResourceResp, err := d.sdkClient.Update(context.TODO(), d.config.ResourceId, updateResourceReq) d.logger.Debug("sdk request 'resources.Update'", slog.Int64("resourceId", d.config.ResourceId), slog.Any("request", updateResourceReq), slog.Any("response", updateResourceResp)) From 02dd11f1963bad6416fbaa6a2d05a756f317e052 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 8 Apr 2025 10:15:00 +0800 Subject: [PATCH 6/6] chore(ui): improve i18n --- migrations/1742209200_upgrade.go | 1 + ui/src/domain/provider.ts | 10 +++++----- ui/src/i18n/locales/en/nls.provider.json | 12 ++++++------ ui/src/i18n/locales/zh/nls.provider.json | 12 ++++++------ 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/migrations/1742209200_upgrade.go b/migrations/1742209200_upgrade.go index da509468..5cda0c35 100644 --- a/migrations/1742209200_upgrade.go +++ b/migrations/1742209200_upgrade.go @@ -261,6 +261,7 @@ func init() { Id string `json:"id"` Type string `json:"type"` Name string `json:"name"` + Config map[string]any `json:"config"` Inputs []map[string]any `json:"inputs"` Outputs []map[string]any `json:"outputs"` Next *dWorkflowNode `json:"next,omitempty"` diff --git a/ui/src/domain/provider.ts b/ui/src/domain/provider.ts index 74296917..3546d71e 100644 --- a/ui/src/domain/provider.ts +++ b/ui/src/domain/provider.ts @@ -418,7 +418,7 @@ export const deployProvidersMap: Map