diff --git a/packages/ui/certd-server/metadata/deploy_AliyunDeployCertToESA.yaml b/packages/ui/certd-server/metadata/deploy_AliyunDeployCertToESA.yaml index a9834cd53..e81c2fa9c 100644 --- a/packages/ui/certd-server/metadata/deploy_AliyunDeployCertToESA.yaml +++ b/packages/ui/certd-server/metadata/deploy_AliyunDeployCertToESA.yaml @@ -6,7 +6,7 @@ name: AliyunDeployCertToESA title: 阿里云-部署至ESA icon: svg:icon-aliyun group: aliyun -desc: 部署证书到阿里云ESA(边缘安全加速),自动删除过期证书 +desc: 部署证书到阿里云ESA(边缘安全加速),支持边缘证书和SaaS证书两种模式 needPlus: false input: cert: @@ -32,7 +32,6 @@ input: }), } } - template: false required: false order: 0 @@ -70,6 +69,20 @@ input: type: aliyun required: true order: 0 + deployMode: + title: 部署模式 + value: edge + component: + name: a-radio-group + vModel: value + options: + - label: 边缘证书 + value: edge + - label: SaaS证书 + value: saas + helper: 边缘证书:将证书部署到站点的边缘节点;SaaS证书:将证书部署到站点的SaaS域名 + required: true + order: 0 siteIds: title: 站点 component: @@ -96,9 +109,40 @@ input: }) }, } - helper: 请选择要部署证书的站点 order: 0 + saasDomainIds: + title: SaaS域名 + helper: 请选择要部署证书的SaaS域名(SaaS证书模式下必选) + component: + name: remote-select + vModel: value + mode: tags + type: plugin + action: onGetCustomHostnameList + search: false + pager: false + single: false + watches: + - certDomains + - accessId + - siteIds + - accessId + - regionId + required: false + mergeScript: |2- + + return { + show: ctx.compute(({form})=>{ + return form.deployMode === 'saas' + }), + component:{ + form: ctx.compute(({form})=>{ + return form + }) + }, + } + order: 0 certLimit: title: 免费证书数量限制 value: 2 @@ -111,4 +155,4 @@ input: output: {} pluginType: deploy type: builtIn -scriptFilePath: /plugins/plugin-aliyun/plugin/deploy-to-esa/index.js +scriptFilePath: /plugins/plugin-aliyun/plugin/deploy-to-esa/index.js \ No newline at end of file diff --git a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-cdn/index.ts b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-cdn/index.ts index 666943042..d4aef9121 100644 --- a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-cdn/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-cdn/index.ts @@ -254,13 +254,16 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin { const client = await this.getClient(access); const pager = new Pager(data); - const params = { - DomainName: data.searchKey, + const params: any = { PageSize: pager.pageSize || 100, PageNumber: pager.pageNo || 1, DomainSearchType: "fuzzy_match", }; + if (data.searchKey) { + params.DomainName = data.searchKey; + } + const requestOption = { method: "POST", formatParams: false, diff --git a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts index 25da6228f..0ee34e4d4 100644 --- a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts @@ -100,7 +100,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin { if (this.domainMatchMode === "auto") { const { result, deployedList } = await this.autoMatchedDeploy({ - targetName: "CDN加速域名", + targetName: "DCDN加速域名", uploadCert: async () => { return await sslClient.uploadCertOrGet(this.cert); }, @@ -190,13 +190,15 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin { const client = await this.getClient(access); const pager = new Pager(data); - const params = { - DomainName: data.searchKey, + const params: any = { PageSize: pager.pageSize || 200, PageNumber: pager.pageNo || 1, DomainSearchType: "fuzzy_match", }; + if (data.searchKey) { + params.DomainName = data.searchKey; + } const requestOption = { method: "POST", formatParams: false,