mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore:
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<div class="cd-page-account">
|
||||
<iframe >
|
||||
|
||||
</iframe>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -2,10 +2,11 @@ import { compute, CreateCrudOptionsRet, dict } from "@fast-crud/fast-crud";
|
||||
import { PluginGroup } from "@certd/pipeline";
|
||||
import { useReference } from "/@/use/use-refrence";
|
||||
import _ from "lodash-es";
|
||||
import { useUserStore } from "/@/store/modules/user";
|
||||
|
||||
export default function (certPluginGroup: PluginGroup, formWrapperRef: any): CreateCrudOptionsRet {
|
||||
const inputs: any = {};
|
||||
|
||||
const userStore = useUserStore();
|
||||
for (const plugin of certPluginGroup.plugins) {
|
||||
for (const inputKey in plugin.input) {
|
||||
if (inputs[inputKey]) {
|
||||
@@ -100,9 +101,12 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre
|
||||
order: 101,
|
||||
helper: {
|
||||
render: () => {
|
||||
if (userStore.isPlus) {
|
||||
return "";
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
需要配置<router-link to={{ path: "/certd/settings/email" }}>邮件服务器</router-link>才能发送邮件
|
||||
需要配置<router-link to={{ path: "/certd/settings/email" }}>邮件服务器</router-link>才能发送邮件(专业版请忽略)
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
+9
-2
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<a-drawer v-model:open="notificationDrawerVisible" placement="right" :closable="true" width="600px" class="pi-notification-form" @after-open-change="notificationDrawerOnAfterVisibleChange">
|
||||
<a-drawer
|
||||
v-model:open="notificationDrawerVisible"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
width="600px"
|
||||
class="pi-notification-form"
|
||||
@after-open-change="notificationDrawerOnAfterVisibleChange"
|
||||
>
|
||||
<template #title>
|
||||
编辑触发器
|
||||
编辑通知
|
||||
<a-button v-if="mode === 'edit'" @click="notificationDelete()">
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
</a-button>
|
||||
|
||||
+4
-1
@@ -14,13 +14,14 @@
|
||||
}"
|
||||
/>
|
||||
|
||||
<a-alert class="m-1" type="info">
|
||||
<a-alert v-if="!userStore.isPlus" class="m-1" type="info">
|
||||
<template #message> 还没有配置邮件服务器?<router-link :to="{ path: '/certd/settings/email' }">现在就去</router-link> </template>
|
||||
</a-alert>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { Ref, ref, watch } from "vue";
|
||||
import { useUserStore } from "/@/store/modules/user";
|
||||
|
||||
const props = defineProps({
|
||||
options: {
|
||||
@@ -29,6 +30,8 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const optionsFormState: Ref<any> = ref({});
|
||||
|
||||
watch(
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
<a-form-item label="管理其他用户流水线" name="managerOtherUserPipeline">
|
||||
<a-switch v-model:checked="formState.managerOtherUserPipeline" />
|
||||
</a-form-item>
|
||||
<!-- <a-form-item label="启动后触发流水线" name="triggerOnStartup">-->
|
||||
<!-- <a-switch v-model:checked="formState.triggerOnStartup" />-->
|
||||
<!-- <div class="helper">启动后自动触发一次所有已启用的流水线</div>-->
|
||||
<!-- </a-form-item>-->
|
||||
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
|
||||
<a-button type="primary" html-type="submit">保存</a-button>
|
||||
</a-form-item>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Autoload, Config, Init, Inject, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { PipelineService } from '../pipeline/service/pipeline-service.js';
|
||||
import { logger } from '../../utils/logger.js';
|
||||
import { SysSettingsService } from '../system/service/sys-settings-service.js';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Singleton)
|
||||
@@ -16,9 +17,13 @@ export class AutoRegisterCron {
|
||||
@Config('cron.immediateTriggerOnce')
|
||||
private immediateTriggerOnce = false;
|
||||
|
||||
@Inject()
|
||||
sysSettingsService: SysSettingsService;
|
||||
|
||||
@Init()
|
||||
async init() {
|
||||
logger.info('加载定时trigger开始');
|
||||
|
||||
await this.pipelineService.onStartup(this.immediateTriggerOnce, this.onlyAdminUser);
|
||||
// logger.info(this.echoPlugin, this.echoPlugin.test);
|
||||
// logger.info('加载定时trigger完成');
|
||||
|
||||
@@ -13,6 +13,7 @@ export class SysPublicSettings extends BaseSettings {
|
||||
static __access__ = 'public';
|
||||
registerEnabled = false;
|
||||
managerOtherUserPipeline = false;
|
||||
// triggerOnStartup = false;
|
||||
}
|
||||
|
||||
export class SysPrivateSettings extends BaseSettings {
|
||||
|
||||
@@ -24,7 +24,9 @@ export class RestartCertdPlugin extends AbstractTaskPlugin {
|
||||
delay = 30;
|
||||
async onInstance() {}
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info(`延迟 ${this.delay} 秒后重启 Certd`);
|
||||
setTimeout(() => {
|
||||
this.logger.info('重启 Certd');
|
||||
process.exit(1);
|
||||
}, this.delay * 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user