mirror of
https://github.com/certd/certd.git
synced 2026-05-03 03:57:24 +08:00
fix: 修复商业版设置了公共eab,创建流水线仍然会显示需要配置eab的bug
This commit is contained in:
@@ -85,7 +85,7 @@ export function useCertPipelineCreator() {
|
|||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
function createCrudOptions(req: { certPlugin: any; doSubmit: any; title?: string }): CreateCrudOptionsRet {
|
function createCrudOptions(req: { certPlugin: any; doSubmit: any; title?: string; initialForm?: any }): CreateCrudOptionsRet {
|
||||||
const inputs: any = {};
|
const inputs: any = {};
|
||||||
const moreParams = [];
|
const moreParams = [];
|
||||||
const doSubmit = req.doSubmit;
|
const doSubmit = req.doSubmit;
|
||||||
@@ -124,9 +124,11 @@ export function useCertPipelineCreator() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
form: {
|
form: {
|
||||||
|
initialForm: req.initialForm || {},
|
||||||
doSubmit,
|
doSubmit,
|
||||||
wrapper: {
|
wrapper: {
|
||||||
wrapClassName: "cert_pipeline_create_form",
|
wrapClassName: "cert_pipeline_create_form",
|
||||||
@@ -326,6 +328,15 @@ export function useCertPipelineCreator() {
|
|||||||
//检查是否流水线数量超出限制
|
//检查是否流水线数量超出限制
|
||||||
await checkPipelineLimit();
|
await checkPipelineLimit();
|
||||||
|
|
||||||
|
//设置系统初始值
|
||||||
|
const initialForm: any = {};
|
||||||
|
const pluginSysConfig = await pluginStore.getPluginConfig({ name: req.pluginName, type: "builtIn" });
|
||||||
|
if (pluginSysConfig.sysSetting?.input) {
|
||||||
|
for (const key in pluginSysConfig.sysSetting?.input) {
|
||||||
|
initialForm[key] = pluginSysConfig.sysSetting?.input[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function doSubmit({ form }: any) {
|
async function doSubmit({ form }: any) {
|
||||||
// const certDetail = readCertDetail(form.cert.crt);
|
// const certDetail = readCertDetail(form.cert.crt);
|
||||||
// 添加certd pipeline
|
// 添加certd pipeline
|
||||||
@@ -399,6 +410,7 @@ export function useCertPipelineCreator() {
|
|||||||
certPlugin,
|
certPlugin,
|
||||||
doSubmit,
|
doSubmit,
|
||||||
title: req.title,
|
title: req.title,
|
||||||
|
initialForm,
|
||||||
});
|
});
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
crudOptions.columns.groupId.form.value = req.defaultGroupId || undefined;
|
crudOptions.columns.groupId.form.value = req.defaultGroupId || undefined;
|
||||||
|
|||||||
@@ -178,6 +178,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
type: "dict-select",
|
type: "dict-select",
|
||||||
search: {
|
search: {
|
||||||
show: true,
|
show: true,
|
||||||
|
component: {
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
order: 0,
|
order: 0,
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
mergeScript: `
|
mergeScript: `
|
||||||
return {
|
return {
|
||||||
show: ctx.compute(({form})=>{
|
show: ctx.compute(({form})=>{
|
||||||
|
console.log("show",form)
|
||||||
return (form.sslProvider === 'zerossl' && !form.zerosslCommonEabAccessId)
|
return (form.sslProvider === 'zerossl' && !form.zerosslCommonEabAccessId)
|
||||||
|| (form.sslProvider === 'google' && !form.googleCommonEabAccessId)
|
|| (form.sslProvider === 'google' && !form.googleCommonEabAccessId)
|
||||||
|| (form.sslProvider === 'sslcom' && !form.sslcomCommonEabAccessId)
|
|| (form.sslProvider === 'sslcom' && !form.sslcomCommonEabAccessId)
|
||||||
|
|||||||
Reference in New Issue
Block a user