mirror of
https://github.com/certd/certd.git
synced 2026-07-12 16:27:34 +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,
|
action: DeployCertToAliyunCDN.prototype.onGetDomainList.name,
|
||||||
watches: ['certDomains', 'accessId'],
|
watches: ['certDomains', 'accessId'],
|
||||||
required: true,
|
required: true,
|
||||||
|
pageSize: 100,
|
||||||
|
search:true,
|
||||||
mergeScript: `
|
mergeScript: `
|
||||||
return {
|
return {
|
||||||
show: ctx.compute(({form})=>{
|
show: ctx.compute(({form})=>{
|
||||||
@@ -256,9 +258,10 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
const pager = new Pager(data)
|
const pager = new Pager(data)
|
||||||
const params = {
|
const params = {
|
||||||
// 'DomainName': 'aaa',
|
DomainName: data.searchKey,
|
||||||
PageSize: pager.pageSize || 100,
|
PageSize: pager.pageSize || 100,
|
||||||
PageNumber: pager.pageNo || 1,
|
PageNumber: pager.pageNo || 1,
|
||||||
|
DomainSearchType: "fuzzy_match"
|
||||||
};
|
};
|
||||||
|
|
||||||
const requestOption = {
|
const requestOption = {
|
||||||
@@ -275,7 +278,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
|||||||
total: 0,
|
total: 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const total = res?.Domains?.TotalCount || 0;
|
const total = res?.TotalCount || 0;
|
||||||
const options = pageData.map((item: any) => {
|
const options = pageData.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
value: item.DomainName,
|
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 {
|
import {
|
||||||
createCertDomainGetterInputDefine,
|
createCertDomainGetterInputDefine,
|
||||||
createRemoteSelectInputDefine
|
createRemoteSelectInputDefine
|
||||||
@@ -76,6 +76,8 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
|||||||
action: DeployCertToAliyunDCDN.prototype.onGetDomainList.name,
|
action: DeployCertToAliyunDCDN.prototype.onGetDomainList.name,
|
||||||
watches: ['certDomains', 'accessId'],
|
watches: ['certDomains', 'accessId'],
|
||||||
required: true,
|
required: true,
|
||||||
|
pageSize: 100,
|
||||||
|
search:true,
|
||||||
pager:true,
|
pager:true,
|
||||||
mergeScript: `
|
mergeScript: `
|
||||||
return {
|
return {
|
||||||
@@ -196,10 +198,12 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
|||||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||||
|
|
||||||
const client = await this.getClient(access);
|
const client = await this.getClient(access);
|
||||||
|
const pager = new Pager(data)
|
||||||
const params = {
|
const params = {
|
||||||
PageNumber: data.pageNo || 1,
|
DomainName: data.searchKey,
|
||||||
PageSize: 500,
|
PageSize: pager.pageSize || 200,
|
||||||
|
PageNumber: pager.pageNo || 1,
|
||||||
|
DomainSearchType: "fuzzy_match"
|
||||||
};
|
};
|
||||||
|
|
||||||
const requestOption = {
|
const requestOption = {
|
||||||
@@ -210,7 +214,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
|||||||
const res = await client.request('DescribeDcdnUserDomains', params, requestOption);
|
const res = await client.request('DescribeDcdnUserDomains', params, requestOption);
|
||||||
this.checkRet(res);
|
this.checkRet(res);
|
||||||
const pageData = res?.Domains?.PageData || [];
|
const pageData = res?.Domains?.PageData || [];
|
||||||
const total = res?.Domains?.TotalCount || 0;
|
const total = res?.TotalCount || 0;
|
||||||
|
|
||||||
const options = pageData.map((item: any) => {
|
const options = pageData.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user