From dc5baa10ccd03be689cb4c3ccead53d429f9a954 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Mon, 3 Mar 2025 14:05:14 +0800 Subject: [PATCH] fix: Fix issue with certificate application failure --- agent/app/service/website_ssl.go | 20 +++++++++++-------- frontend/src/components/backup/index.vue | 2 +- frontend/src/components/compose-log/index.vue | 2 +- frontend/src/components/drawer-pro/index.vue | 10 +++++----- frontend/src/components/group/change.vue | 2 +- frontend/src/components/group/index.vue | 2 +- frontend/src/components/log-dialog/index.vue | 2 +- .../system-upgrade/upgrade/index.vue | 2 +- frontend/src/components/upload/index.vue | 2 +- frontend/src/views/ai/model/add/index.vue | 2 +- frontend/src/views/ai/model/conn/index.vue | 2 +- frontend/src/views/ai/model/domain/index.vue | 2 +- .../src/views/ai/model/terminal/index.vue | 2 +- frontend/src/views/app-store/detail/index.vue | 2 +- .../views/app-store/detail/install/index.vue | 2 +- .../app-store/installed/detail/index.vue | 2 +- .../app-store/installed/ignore/index.vue | 2 +- .../app-store/installed/upgrade/index.vue | 2 +- .../setting/default-domain/index.vue | 2 +- .../views/container/compose/create/index.vue | 2 +- .../views/container/compose/edit/index.vue | 2 +- .../container/container/commit/index.vue | 2 +- .../views/container/container/log/index.vue | 2 +- .../container/container/monitor/index.vue | 8 +++++++- .../container/container/rename/index.vue | 2 +- .../container/container/terminal/index.vue | 2 +- .../container/container/upgrade/index.vue | 2 +- .../src/views/container/image/build/index.vue | 2 +- .../views/container/image/delete/index.vue | 2 +- .../src/views/container/image/load/index.vue | 2 +- .../src/views/container/image/prune/index.vue | 2 +- .../src/views/container/image/pull/index.vue | 2 +- .../src/views/container/image/push/index.vue | 2 +- .../src/views/container/image/save/index.vue | 2 +- .../src/views/container/image/tag/index.vue | 2 +- .../views/container/network/create/index.vue | 2 +- .../views/container/repo/operator/index.vue | 2 +- .../views/container/setting/ipv6/index.vue | 2 +- .../src/views/container/setting/log/index.vue | 2 +- .../views/container/setting/mirror/index.vue | 2 +- .../container/setting/registry/index.vue | 2 +- .../container/setting/sock-path/index.vue | 2 +- .../views/container/template/detail/index.vue | 2 +- .../container/template/operator/index.vue | 2 +- .../views/container/volume/create/index.vue | 2 +- frontend/src/views/cronjob/backup/index.vue | 2 +- frontend/src/views/cronjob/operate/index.vue | 2 +- .../src/views/database/mysql/bind/index.vue | 2 +- .../src/views/database/mysql/conn/index.vue | 2 +- .../src/views/database/mysql/create/index.vue | 2 +- .../views/database/mysql/password/index.vue | 2 +- .../database/mysql/remote/operate/index.vue | 2 +- .../views/database/postgresql/bind/index.vue | 2 +- .../views/database/postgresql/conn/index.vue | 2 +- .../database/postgresql/create/index.vue | 2 +- .../database/postgresql/password/index.vue | 2 +- .../database/postgresql/privileges/index.vue | 2 +- .../postgresql/remote/operate/index.vue | 2 +- .../views/database/redis/command/index.vue | 2 +- .../src/views/database/redis/conn/index.vue | 2 +- .../database/redis/remote/operate/index.vue | 2 +- .../host/file-management/batch-role/index.vue | 2 +- .../file-management/change-role/index.vue | 2 +- .../host/file-management/chown/index.vue | 2 +- .../host/file-management/compress/index.vue | 2 +- .../host/file-management/create/index.vue | 2 +- .../host/file-management/decompress/index.vue | 2 +- .../host/file-management/detail/index.vue | 2 +- .../host/file-management/download/index.vue | 2 +- .../host/file-management/favorite/index.vue | 2 +- .../views/host/file-management/move/index.vue | 2 +- .../file-management/recycle-bin/index.vue | 2 +- .../host/file-management/rename/index.vue | 2 +- .../host/file-management/upload/index.vue | 2 +- .../views/host/file-management/wget/index.vue | 2 +- .../host/firewall/forward/operate/index.vue | 2 +- .../views/host/firewall/ip/operate/index.vue | 2 +- .../host/firewall/port/operate/index.vue | 2 +- .../views/host/monitor/setting/days/index.vue | 2 +- .../monitor/setting/default-network/index.vue | 2 +- .../host/monitor/setting/interval/index.vue | 2 +- .../host/process/process/detail/index.vue | 2 +- .../src/views/host/ssh/ssh/address/index.vue | 2 +- .../src/views/host/ssh/ssh/port/index.vue | 2 +- .../src/views/host/ssh/ssh/pubkey/index.vue | 2 +- .../src/views/host/ssh/ssh/root/index.vue | 2 +- .../setting/backup-account/operate/index.vue | 2 +- .../src/views/setting/license/bind/index.vue | 2 +- .../setting/panel/api-interface/index.vue | 2 +- .../views/setting/panel/hidemenu/index.vue | 2 +- .../src/views/setting/panel/name/index.vue | 2 +- .../views/setting/panel/password/index.vue | 2 +- .../src/views/setting/panel/proxy/index.vue | 2 +- .../views/setting/panel/systemip/index.vue | 2 +- .../views/setting/panel/theme-color/index.vue | 2 +- .../src/views/setting/panel/timeout/index.vue | 2 +- .../views/setting/panel/username/index.vue | 2 +- .../src/views/setting/safe/allowips/index.vue | 2 +- .../src/views/setting/safe/bind/index.vue | 2 +- .../src/views/setting/safe/domain/index.vue | 2 +- .../src/views/setting/safe/entrance/index.vue | 2 +- frontend/src/views/setting/safe/mfa/index.vue | 2 +- .../src/views/setting/safe/port/index.vue | 2 +- .../src/views/setting/safe/response/index.vue | 2 +- frontend/src/views/setting/safe/ssl/index.vue | 2 +- .../src/views/setting/safe/timeout/index.vue | 2 +- .../views/setting/snapshot/create/index.vue | 2 +- .../setting/snapshot/ignore-rule/index.vue | 2 +- .../views/setting/snapshot/import/index.vue | 2 +- .../views/setting/snapshot/status/index.vue | 2 +- frontend/src/views/terminal/command/index.vue | 2 +- .../src/views/terminal/host/operate/index.vue | 2 +- .../views/terminal/terminal/host-create.vue | 2 +- .../src/views/toolbox/clam/operate/index.vue | 2 +- .../src/views/toolbox/device/dns/index.vue | 2 +- .../views/toolbox/device/hostname/index.vue | 2 +- .../src/views/toolbox/device/hosts/index.vue | 2 +- .../src/views/toolbox/device/ntp/index.vue | 2 +- .../src/views/toolbox/device/passwd/index.vue | 2 +- .../src/views/toolbox/device/swap/index.vue | 2 +- .../views/toolbox/device/time-zone/index.vue | 2 +- .../toolbox/fail2ban/ban-action/index.vue | 2 +- .../views/toolbox/fail2ban/ban-time/index.vue | 2 +- .../toolbox/fail2ban/find-time/index.vue | 2 +- .../src/views/toolbox/fail2ban/ips/index.vue | 2 +- .../views/toolbox/fail2ban/log-path/index.vue | 2 +- .../toolbox/fail2ban/max-retry/index.vue | 2 +- .../src/views/toolbox/fail2ban/port/index.vue | 2 +- frontend/src/views/toolbox/ftp/log/index.vue | 2 +- .../src/views/toolbox/ftp/operate/index.vue | 2 +- .../views/toolbox/supervisor/create/index.vue | 2 +- .../views/toolbox/supervisor/file/index.vue | 2 +- .../toolbox/supervisor/status/init/index.vue | 2 +- .../website/runtime/dotnet/operate/index.vue | 2 +- .../website/runtime/go/operate/index.vue | 2 +- .../website/runtime/java/operate/index.vue | 2 +- .../website/runtime/node/module/index.vue | 2 +- .../website/runtime/node/operate/index.vue | 2 +- .../website/runtime/php/config/index.vue | 8 +++++++- .../website/runtime/php/create/index.vue | 2 +- .../php/extension-management/index.vue | 2 +- .../runtime/php/extension-template/index.vue | 2 +- .../runtime/php/supervisor/create/index.vue | 2 +- .../runtime/php/supervisor/file/index.vue | 2 +- .../website/runtime/php/supervisor/index.vue | 2 +- .../website/runtime/python/operate/index.vue | 2 +- .../views/website/ssl/acme-account/index.vue | 2 +- .../src/views/website/ssl/ca/detail/index.vue | 2 +- frontend/src/views/website/ssl/ca/index.vue | 2 +- .../src/views/website/ssl/create/index.vue | 3 ++- .../src/views/website/ssl/detail/index.vue | 2 +- .../views/website/ssl/dns-account/index.vue | 2 +- .../src/views/website/ssl/upload/index.vue | 2 +- .../config/basic/auth-basic/create/index.vue | 2 +- .../config/basic/domain/create/index.vue | 2 +- .../config/basic/load-balance/file/index.vue | 2 +- .../basic/load-balance/operate/index.vue | 2 +- .../config/basic/proxy/cache/index.vue | 2 +- .../config/basic/proxy/create/index.vue | 2 +- .../website/config/basic/proxy/file/index.vue | 2 +- .../config/basic/redirect/create/index.vue | 2 +- .../config/basic/redirect/file/index.vue | 2 +- .../config/basic/rewrite/custom/index.vue | 2 +- .../views/website/website/create/index.vue | 2 +- .../views/website/website/default/index.vue | 2 +- .../src/views/website/website/html/index.vue | 2 +- .../website/nginx/module/build/index.vue | 2 +- .../website/nginx/module/operate/index.vue | 2 +- 168 files changed, 196 insertions(+), 179 deletions(-) diff --git a/agent/app/service/website_ssl.go b/agent/app/service/website_ssl.go index bcc3c760d4c4..8d95c6d18bd5 100644 --- a/agent/app/service/website_ssl.go +++ b/agent/app/service/website_ssl.go @@ -448,15 +448,19 @@ func (w WebsiteSSLService) Delete(ids []uint) error { if err != nil { return err } - acmeAccount, err := websiteAcmeRepo.GetFirst(repo.WithByID(websiteSSL.AcmeAccountID)) - if err != nil { - return err - } - client, err := ssl.NewAcmeClient(acmeAccount) - if err != nil { - return err + if websiteSSL.Type != constant.Manual && websiteSSL.Type != constant.SelfSigned { + acmeAccount, err := websiteAcmeRepo.GetFirst(repo.WithByID(websiteSSL.AcmeAccountID)) + if err != nil { + return err + } + client, err := ssl.NewAcmeClient(acmeAccount) + if err != nil { + return err + } + go func() { + _ = client.RevokeSSL([]byte(websiteSSL.Pem)) + }() } - _ = client.RevokeSSL([]byte(websiteSSL.Pem)) _ = websiteSSLRepo.DeleteBy(repo.WithByID(id)) } if len(names) > 0 { diff --git a/frontend/src/components/backup/index.vue b/frontend/src/components/backup/index.vue index c8fcb3ef1a0f..8f858825d788 100644 --- a/frontend/src/components/backup/index.vue +++ b/frontend/src/components/backup/index.vue @@ -3,7 +3,7 @@ v-model="backupVisible" :header="$t('commons.button.backup')" :resource="detailName ? name + ' [' + detailName + ']' : name" - :back="handleClose" + @close="handleClose" size="large" >