mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
chore:
This commit is contained in:
@@ -110,7 +110,6 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
|
||||
const define = await api.GetProviderDefine(value);
|
||||
currentDefine.value = define;
|
||||
console.log("define", define);
|
||||
debugger;
|
||||
if (!immediate) {
|
||||
form.body = {};
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
|
||||
const addRequest = async (req: AddReq) => {
|
||||
const { form } = req;
|
||||
debugger;
|
||||
const res = await api.AddObj(form);
|
||||
return res;
|
||||
};
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<span v-else class="mlr-5 text-gray">{{ placeholder }}</span>
|
||||
<a-button class="ml-5" :disabled="disabled" :size="size" @click="chooseForm.open">选择</a-button>
|
||||
<a-form-item-rest v-if="chooseForm.show">
|
||||
<a-modal v-model:open="chooseForm.show" title="选择通知" width="900px" @ok="chooseForm.ok">
|
||||
<a-modal v-model:open="chooseForm.show" title="选择通知渠道" width="900px" @ok="chooseForm.ok">
|
||||
<div style="height: 400px; position: relative">
|
||||
<cert-notification-modal v-model="selectedId"></cert-notification-modal>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import _, { merge } from "lodash-es";
|
||||
import { useUserStore } from "/@/store/modules/user";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import * as api from "../api.plugin";
|
||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||
export default function (certPluginGroup: PluginGroup, formWrapperRef: any): CreateCrudOptionsRet {
|
||||
const inputs: any = {};
|
||||
const userStore = useUserStore();
|
||||
@@ -102,30 +103,16 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre
|
||||
order: 100
|
||||
}
|
||||
},
|
||||
emailNotify: {
|
||||
title: "失败邮件通知",
|
||||
type: "dict-switch",
|
||||
dict: dict({
|
||||
data: [
|
||||
{ value: true, label: "启用" },
|
||||
{ value: false, label: "不启用" }
|
||||
]
|
||||
}),
|
||||
notification: {
|
||||
title: "失败通知",
|
||||
type: "text",
|
||||
form: {
|
||||
component: {
|
||||
name: NotificationSelector,
|
||||
vModel: "modelValue"
|
||||
},
|
||||
order: 101,
|
||||
value: true,
|
||||
helper: {
|
||||
render: () => {
|
||||
if (settingStore.isPlus) {
|
||||
return "建议启用";
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
建议启用,需要配置<router-link to={{ path: "/sys/settings/email" }}>邮件服务器</router-link>才能发送邮件
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
helper: "建议设置,任务执行失败实时提醒"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import * as _ from "lodash-es";
|
||||
import { useModal } from "/@/use/use-modal";
|
||||
import CertView from "./cert-view.vue";
|
||||
import { eachStages } from "./utils";
|
||||
|
||||
import { createApi as createNotificationApi } from "../notification/api";
|
||||
export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
@@ -102,13 +102,13 @@ export default function ({ crudExpose, context: { certdFormRef } }: CreateCrudOp
|
||||
triggers.push({ title: "定时触发", type: "timer", props: { cron: form.triggerCron } });
|
||||
}
|
||||
const notifications = [];
|
||||
if (form.emailNotify) {
|
||||
if (form.notification) {
|
||||
const notify = await createNotificationApi().GetSimpleInfo(form.notification);
|
||||
notifications.push({
|
||||
type: "email",
|
||||
type: "custom",
|
||||
when: ["error", "turnToSuccess"],
|
||||
options: {
|
||||
receivers: [form.email]
|
||||
}
|
||||
notificationId: form.notification,
|
||||
title: notify.name
|
||||
});
|
||||
}
|
||||
let pipeline = {
|
||||
|
||||
@@ -75,7 +75,8 @@ export type PluginConfigBean = {
|
||||
};
|
||||
|
||||
export type CertApplyPluginSysInput = {
|
||||
googleCommonEabAccessId: number;
|
||||
googleCommonEabAccessId?: number;
|
||||
zerosslCommonEabAccessId?: number;
|
||||
};
|
||||
export type PluginSysSetting<T> = {
|
||||
sysSetting: {
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
// @ts-ignore
|
||||
import { request } from "/@/api/service";
|
||||
import { SysPrivateSetting, SysPublicSetting } from "/@/api/modules/api.basic";
|
||||
const apiPrefix = "/sys/settings";
|
||||
export type SysSettings = { public: SysPublicSetting; private: SysPrivateSetting };
|
||||
|
||||
export type SysPublicSetting = {
|
||||
registerEnabled?: boolean;
|
||||
limitUserPipelineCount?: number;
|
||||
managerOtherUserPipeline?: boolean;
|
||||
icpNo?: string;
|
||||
};
|
||||
|
||||
export type SysPrivateSetting = {
|
||||
httpProxy?: string;
|
||||
httpsProxy?: string;
|
||||
dnsResultOrder?: string;
|
||||
commonCnameEnabled?: boolean;
|
||||
};
|
||||
|
||||
export const SettingKeys = {
|
||||
SysPublic: "sys.public",
|
||||
SysPrivate: "sys.private",
|
||||
|
||||
@@ -73,7 +73,7 @@ import { notification } from "ant-design-vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { merge } from "lodash-es";
|
||||
import { util } from "/@/utils";
|
||||
|
||||
import NotificationSelector from "/src/views/certd/notification/notification-selector/index.vue";
|
||||
defineOptions({
|
||||
name: "SysSettings"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user