mirror of https://github.com/certd/certd
perf: 说明优化,默认值优化
parent
4656019898
commit
970c7fd8a0
|
@ -2,7 +2,7 @@ import { IsAccess, AccessInput } from "@certd/pipeline";
|
||||||
|
|
||||||
@IsAccess({
|
@IsAccess({
|
||||||
name: "eab",
|
name: "eab",
|
||||||
title: "EABAccess",
|
title: "EAB授权",
|
||||||
desc: "ZeroSSL证书申请需要EAB授权",
|
desc: "ZeroSSL证书申请需要EAB授权",
|
||||||
})
|
})
|
||||||
export class EabAccess {
|
export class EabAccess {
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class CertApplyPlugin extends AbstractTaskPlugin {
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "证书提供商",
|
title: "证书提供商",
|
||||||
value: "letsencrypt",
|
default: "letsencrypt",
|
||||||
component: {
|
component: {
|
||||||
name: "a-select",
|
name: "a-select",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<fs-icon class="cd-icon-button" icon="ion:close-circle-outline" @click="clear"></fs-icon>
|
<fs-icon class="cd-icon-button" icon="ion:close-circle-outline" @click="clear"></fs-icon>
|
||||||
</span>
|
</span>
|
||||||
<span v-else class="mlr-5 gray">请选择</span>
|
<span v-else class="mlr-5 gray">请选择</span>
|
||||||
<a-button @click="chooseForm.open">选择</a-button>
|
<a-button class="ml-5" @click="chooseForm.open">选择</a-button>
|
||||||
<a-form-item-rest v-if="chooseForm.show">
|
<a-form-item-rest v-if="chooseForm.show">
|
||||||
<a-modal v-model:open="chooseForm.show" title="选择授权提供者" width="700px" @ok="chooseForm.ok">
|
<a-modal v-model:open="chooseForm.show" title="选择授权提供者" width="700px" @ok="chooseForm.ok">
|
||||||
<div style="height: 400px; position: relative">
|
<div style="height: 400px; position: relative">
|
||||||
|
@ -46,9 +46,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear(){
|
function clear() {
|
||||||
selectedId.value = "";
|
selectedId.value = "";
|
||||||
target.value = null
|
target.value = null;
|
||||||
ctx.emit("update:modelValue", selectedId.value);
|
ctx.emit("update:modelValue", selectedId.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
clear,
|
clear,
|
||||||
target,
|
target,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { compute } from "@fast-crud/fast-crud";
|
import { compute, CreateCrudOptionsProps, CreateCrudOptionsRet } from "@fast-crud/fast-crud";
|
||||||
import { Dicts } from "./dicts";
|
import { Dicts } from "./dicts";
|
||||||
|
|
||||||
export default function () {
|
export default function (): CreateCrudOptionsRet {
|
||||||
return {
|
return {
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
form: {
|
form: {
|
||||||
|
@ -12,7 +12,7 @@ export default function () {
|
||||||
columns: {
|
columns: {
|
||||||
domains: {
|
domains: {
|
||||||
title: "域名",
|
title: "域名",
|
||||||
type: ["dict-select"],
|
type: "dict-select",
|
||||||
search: {
|
search: {
|
||||||
show: true,
|
show: true,
|
||||||
component: {
|
component: {
|
||||||
|
@ -58,6 +58,30 @@ export default function () {
|
||||||
rules: [{ required: true, type: "email", message: "请填写邮箱" }]
|
rules: [{ required: true, type: "email", message: "请填写邮箱" }]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
blank: {
|
||||||
|
title: "占位",
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
blank: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sslProvider: {
|
||||||
|
title: "证书提供商",
|
||||||
|
type: "dict-select",
|
||||||
|
dict: Dicts.sslProviderDict
|
||||||
|
},
|
||||||
|
eabAccess: {
|
||||||
|
title: "EAB授权",
|
||||||
|
type: "dict-select",
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "PiAccessSelector",
|
||||||
|
type: "eab",
|
||||||
|
vModel: "modelValue"
|
||||||
|
},
|
||||||
|
helper: "如果是ZeroSSL,需要配置EAB授权,https://app.zerossl.com/developer 生成 'EAB' "
|
||||||
|
}
|
||||||
|
},
|
||||||
dnsProviderType: {
|
dnsProviderType: {
|
||||||
title: "DNS提供商",
|
title: "DNS提供商",
|
||||||
type: "dict-select",
|
type: "dict-select",
|
|
@ -1,7 +1,12 @@
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
|
|
||||||
export const Dicts = {
|
export const Dicts = {
|
||||||
certIssuerDict: dict({ data: [{ value: "letencrypt", label: "LetEncrypt" }] }),
|
sslProviderDict: dict({
|
||||||
|
data: [
|
||||||
|
{ value: "letsencrypt", label: "Let‘s Encrypt" },
|
||||||
|
{ value: "zerossl", label: "ZeroSSL" }
|
||||||
|
]
|
||||||
|
}),
|
||||||
challengeTypeDict: dict({ data: [{ value: "dns", label: "DNS校验" }] }),
|
challengeTypeDict: dict({ data: [{ value: "dns", label: "DNS校验" }] }),
|
||||||
dnsProviderTypeDict: dict({
|
dnsProviderTypeDict: dict({
|
||||||
url: "pi/dnsProvider/dnsProviderTypeDict"
|
url: "pi/dnsProvider/dnsProviderTypeDict"
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { ref } from "vue";
|
||||||
import _ from "lodash-es";
|
import _ from "lodash-es";
|
||||||
export default {
|
export default {
|
||||||
name: "PiCertdForm",
|
name: "PiCertdForm",
|
||||||
setup(props:any, ctx:any) {
|
setup(props: any, ctx: any) {
|
||||||
// 自定义表单配置
|
// 自定义表单配置
|
||||||
const { buildFormOptions } = useColumns();
|
const { buildFormOptions } = useColumns();
|
||||||
//使用crudOptions结构来构建自定义表单配置
|
//使用crudOptions结构来构建自定义表单配置
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
||||||
const formOptions = buildFormOptions(
|
const formOptions = buildFormOptions(
|
||||||
_.merge(crudOptions, {
|
_.merge(crudOptions, {
|
||||||
form: {
|
form: {
|
||||||
doSubmit({ form }:any) {
|
doSubmit({ form }: any) {
|
||||||
// 创建certd 的pipeline
|
// 创建certd 的pipeline
|
||||||
doSubmitRef.value({ form });
|
doSubmitRef.value({ form });
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ export default {
|
||||||
const formWrapperRef = ref();
|
const formWrapperRef = ref();
|
||||||
const formWrapperOptions = ref();
|
const formWrapperOptions = ref();
|
||||||
formWrapperOptions.value = formOptions;
|
formWrapperOptions.value = formOptions;
|
||||||
function open(doSubmit:any) {
|
function open(doSubmit: any) {
|
||||||
doSubmitRef.value = doSubmit;
|
doSubmitRef.value = doSubmit;
|
||||||
formWrapperRef.value.open(formWrapperOptions.value);
|
formWrapperRef.value.open(formWrapperOptions.value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,11 @@
|
||||||
<template #actionbar-right>
|
<template #actionbar-right>
|
||||||
<!-- <span style="margin-left: 10px">出现<a-tag>Promise rejected attempt #18,retrying in 10000ms:No TXT recordsfound for name</a-tag>属于正常现象,多重试几次</span>-->
|
<!-- <span style="margin-left: 10px">出现<a-tag>Promise rejected attempt #18,retrying in 10000ms:No TXT recordsfound for name</a-tag>属于正常现象,多重试几次</span>-->
|
||||||
</template>
|
</template>
|
||||||
|
<template #form-bottom>
|
||||||
|
<div>
|
||||||
|
申请证书
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<pi-certd-form ref="certdFormRef"></pi-certd-form>
|
<pi-certd-form ref="certdFormRef"></pi-certd-form>
|
||||||
</fs-crud>
|
</fs-crud>
|
||||||
</fs-page>
|
</fs-page>
|
||||||
|
|
|
@ -64,11 +64,11 @@
|
||||||
name: 'a-select',
|
name: 'a-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
options: [
|
options: [
|
||||||
{ value: 0, label: '正常运行' },
|
{ value: 0, label: '正常运行(证书申请任务请选择它)' },
|
||||||
{ value: 1, label: '成功后跳过' }
|
{ value: 1, label: '成功后跳过(其他任务请选择它)' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
helper:'该任务运行成功一次之后下次运行是否跳过,证书申请任务务必选择正常运行',
|
helper: '该任务运行成功一次之后下次运行是否跳过,保持默认即可',
|
||||||
rules: [{ required: true, message: '此项必填' }]
|
rules: [{ required: true, message: '此项必填' }]
|
||||||
}"
|
}"
|
||||||
:get-context-fn="blankFn"
|
:get-context-fn="blankFn"
|
||||||
|
@ -90,10 +90,10 @@ import { message, Modal } from "ant-design-vue";
|
||||||
import { computed, inject, Ref, ref } from "vue";
|
import { computed, inject, Ref, ref } from "vue";
|
||||||
import _ from "lodash-es";
|
import _ from "lodash-es";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
import {CopyOutlined} from "@ant-design/icons-vue";
|
import { CopyOutlined } from "@ant-design/icons-vue";
|
||||||
export default {
|
export default {
|
||||||
name: "PiStepForm",
|
name: "PiStepForm",
|
||||||
components:{CopyOutlined},
|
components: { CopyOutlined },
|
||||||
props: {
|
props: {
|
||||||
editMode: {
|
editMode: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -173,7 +173,7 @@ export default {
|
||||||
stepDrawerShow();
|
stepDrawerShow();
|
||||||
};
|
};
|
||||||
|
|
||||||
const stepAdd = (emit: any,stepDef:any) => {
|
const stepAdd = (emit: any, stepDef: any) => {
|
||||||
mode.value = "add";
|
mode.value = "add";
|
||||||
const step: any = {
|
const step: any = {
|
||||||
id: nanoid(),
|
id: nanoid(),
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
||||||
input: {},
|
input: {},
|
||||||
status: null
|
status: null
|
||||||
};
|
};
|
||||||
_.merge(step,stepDef)
|
_.merge(step, stepDef);
|
||||||
stepOpen(step, emit);
|
stepOpen(step, emit);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: '大区',
|
title: '大区',
|
||||||
value: 'cn-shanghai',
|
default: 'cn-shanghai',
|
||||||
component: {
|
component: {
|
||||||
placeholder: '集群所属大区',
|
placeholder: '集群所属大区',
|
||||||
},
|
},
|
||||||
|
@ -55,7 +55,7 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: '命名空间',
|
title: '命名空间',
|
||||||
value: 'default',
|
default: 'default',
|
||||||
component: {
|
component: {
|
||||||
placeholder: '命名空间',
|
placeholder: '命名空间',
|
||||||
},
|
},
|
||||||
|
@ -64,7 +64,7 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
|
||||||
namespace!: string;
|
namespace!: string;
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: 'ingress名称',
|
title: 'ingress名称',
|
||||||
value: '',
|
default: '',
|
||||||
component: {
|
component: {
|
||||||
placeholder: 'ingress名称',
|
placeholder: 'ingress名称',
|
||||||
},
|
},
|
||||||
|
@ -74,7 +74,7 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
|
||||||
ingressName!: string;
|
ingressName!: string;
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: 'ingress类型',
|
title: 'ingress类型',
|
||||||
value: 'nginx',
|
default: 'nginx',
|
||||||
component: {
|
component: {
|
||||||
placeholder: '暂时只支持nginx类型',
|
placeholder: '暂时只支持nginx类型',
|
||||||
},
|
},
|
||||||
|
@ -83,8 +83,10 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
|
||||||
ingressClass!: string;
|
ingressClass!: string;
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: '是否私网ip',
|
title: '是否私网ip',
|
||||||
value: false,
|
default: false,
|
||||||
component: {
|
component: {
|
||||||
|
name: 'a-switch',
|
||||||
|
vModel: 'checked',
|
||||||
placeholder: '集群连接端点是否是私网ip',
|
placeholder: '集群连接端点是否是私网ip',
|
||||||
},
|
},
|
||||||
helper: '如果您当前certd运行在同一个私网下,可以选择是。',
|
helper: '如果您当前certd运行在同一个私网下,可以选择是。',
|
||||||
|
|
|
@ -30,7 +30,7 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: '大区',
|
title: '大区',
|
||||||
value: 'cn-hangzhou',
|
default: 'cn-hangzhou',
|
||||||
component: {
|
component: {
|
||||||
name: 'a-select',
|
name: 'a-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
|
|
|
@ -65,7 +65,7 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||||
'开启后,将直接复制到当前主机某个目录,不上传到主机,由于是docker启动,实际上是复制到docker容器内的“证书保存路径”,你需要事先在docker-compose.yaml中配置主机目录映射: volumes: /your_target_path:/your_target_path',
|
'开启后,将直接复制到当前主机某个目录,不上传到主机,由于是docker启动,实际上是复制到docker容器内的“证书保存路径”,你需要事先在docker-compose.yaml中配置主机目录映射: volumes: /your_target_path:/your_target_path',
|
||||||
component: {
|
component: {
|
||||||
name: 'a-switch',
|
name: 'a-switch',
|
||||||
value: false,
|
default: false,
|
||||||
vModel: 'checked',
|
vModel: 'checked',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { DnspodAccess } from '../access';
|
||||||
|
|
||||||
@IsDnsProvider({
|
@IsDnsProvider({
|
||||||
name: 'dnspod',
|
name: 'dnspod',
|
||||||
title: 'dnspod(已过时)',
|
title: 'dnspod(已过时,请尽快换成腾讯云)',
|
||||||
desc: '请尽快换成腾讯云类型',
|
desc: '请尽快换成腾讯云类型',
|
||||||
accessType: 'dnspod',
|
accessType: 'dnspod',
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,7 +24,7 @@ import dayjs from 'dayjs';
|
||||||
export class DeployToClbPlugin extends AbstractTaskPlugin {
|
export class DeployToClbPlugin extends AbstractTaskPlugin {
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: '大区',
|
title: '大区',
|
||||||
value: 'ap-guangzhou',
|
default: 'ap-guangzhou',
|
||||||
component: {
|
component: {
|
||||||
name: 'a-select',
|
name: 'a-select',
|
||||||
options: [{ value: 'ap-guangzhou' }],
|
options: [{ value: 'ap-guangzhou' }],
|
||||||
|
|
Loading…
Reference in New Issue