mirror of https://github.com/certd/certd
chore: 证书输出选择器优化
parent
830de90317
commit
7aa3d8e5d9
|
@ -14,7 +14,7 @@ export default {
|
|||
default: undefined
|
||||
},
|
||||
from: {
|
||||
type: String
|
||||
type: [String, Array]
|
||||
}
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
|
@ -36,7 +36,11 @@ export default {
|
|||
currentTask: currentTask.value
|
||||
});
|
||||
if (props.from) {
|
||||
options.value = options.value.filter((item: any) => item.type === props.from);
|
||||
if (typeof props.from === "string") {
|
||||
options.value = options.value.filter((item: any) => item.type === props.from);
|
||||
} else {
|
||||
options.value = options.value.filter((item: any) => props.from.includes(item.type));
|
||||
}
|
||||
}
|
||||
if (props.modelValue == null && options.value.length > 0) {
|
||||
ctx.emit("update:modelValue", options.value[0].value);
|
||||
|
|
|
@ -88,7 +88,7 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -31,7 +31,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -31,7 +31,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
||||
import { appendTimeSuffix, checkRet } from '../../utils/index.js';
|
||||
import { AliyunAccess, AliyunClient } from "@certd/plugin-plus";
|
||||
import { AliyunAccess, AliyunClient } from '@certd/plugin-plus';
|
||||
|
||||
@IsTaskPlugin({
|
||||
name: 'uploadCertToAliyun',
|
||||
|
@ -37,7 +37,7 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
@ -86,14 +86,14 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
|
|||
}
|
||||
|
||||
async getClient(aliyunProvider: AliyunAccess) {
|
||||
const client = new AliyunClient({logger:this.logger})
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
await client.init({
|
||||
accessKeyId: aliyunProvider.accessKeyId,
|
||||
accessKeySecret: aliyunProvider.accessKeySecret,
|
||||
endpoint: 'https://cas.aliyuncs.com',
|
||||
apiVersion: '2018-07-13',
|
||||
})
|
||||
return client
|
||||
});
|
||||
return client;
|
||||
}
|
||||
}
|
||||
//注册插件
|
||||
|
|
|
@ -54,7 +54,7 @@ export class CloudflareDeployToCDNPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -53,7 +53,7 @@ export class DemoTestPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
// required: true,
|
||||
})
|
||||
|
|
|
@ -26,7 +26,7 @@ export class DogeCloudDeployToCDNPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -56,7 +56,7 @@ export class CopyCertToLocalPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -56,7 +56,7 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -60,7 +60,7 @@ export class K8STestPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -36,7 +36,7 @@ export class CustomScriptPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -18,7 +18,7 @@ export class DeployToCdnPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -75,7 +75,7 @@ export class DeployToClbPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -83,7 +83,7 @@ export class DeployCertToTencentTKEIngressPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
|
@ -32,7 +32,7 @@ export class UploadToTencentPlugin extends AbstractTaskPlugin {
|
|||
helper: '请选择前置任务输出的域名证书',
|
||||
component: {
|
||||
name: 'pi-output-selector',
|
||||
from: 'CertApply',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue