mirror of
https://github.com/certd/certd.git
synced 2026-06-13 12:47:32 +08:00
fix: 修复查询阿里云cdn Dcdn 域名太多无法选择的bug
This commit is contained in:
@@ -104,6 +104,8 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
action: DeployCertToAliyunCDN.prototype.onGetDomainList.name,
|
||||
watches: ['certDomains', 'accessId'],
|
||||
required: true,
|
||||
pageSize: 100,
|
||||
search:true,
|
||||
mergeScript: `
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
@@ -256,9 +258,10 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
|
||||
const pager = new Pager(data)
|
||||
const params = {
|
||||
// 'DomainName': 'aaa',
|
||||
DomainName: data.searchKey,
|
||||
PageSize: pager.pageSize || 100,
|
||||
PageNumber: pager.pageNo || 1,
|
||||
DomainSearchType: "fuzzy_match"
|
||||
};
|
||||
|
||||
const requestOption = {
|
||||
@@ -275,7 +278,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
total: 0,
|
||||
};
|
||||
}
|
||||
const total = res?.Domains?.TotalCount || 0;
|
||||
const total = res?.TotalCount || 0;
|
||||
const options = pageData.map((item: any) => {
|
||||
return {
|
||||
value: item.DomainName,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
||||
import {
|
||||
createCertDomainGetterInputDefine,
|
||||
createRemoteSelectInputDefine
|
||||
@@ -76,6 +76,8 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
action: DeployCertToAliyunDCDN.prototype.onGetDomainList.name,
|
||||
watches: ['certDomains', 'accessId'],
|
||||
required: true,
|
||||
pageSize: 100,
|
||||
search:true,
|
||||
pager:true,
|
||||
mergeScript: `
|
||||
return {
|
||||
@@ -196,10 +198,12 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const pager = new Pager(data)
|
||||
const params = {
|
||||
PageNumber: data.pageNo || 1,
|
||||
PageSize: 500,
|
||||
DomainName: data.searchKey,
|
||||
PageSize: pager.pageSize || 200,
|
||||
PageNumber: pager.pageNo || 1,
|
||||
DomainSearchType: "fuzzy_match"
|
||||
};
|
||||
|
||||
const requestOption = {
|
||||
@@ -210,7 +214,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
const res = await client.request('DescribeDcdnUserDomains', params, requestOption);
|
||||
this.checkRet(res);
|
||||
const pageData = res?.Domains?.PageData || [];
|
||||
const total = res?.Domains?.TotalCount || 0;
|
||||
const total = res?.TotalCount || 0;
|
||||
|
||||
const options = pageData.map((item: any) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user