diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 6ebb2c50..d66f7aa9 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -4,6 +4,7 @@ "version": "1.27.0", "type": "module", "main": "./dist/index.js", + "module": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { "dev": "vite", diff --git a/packages/ui/certd-client/src/api/service.ts b/packages/ui/certd-client/src/api/service.ts index df000c1f..41c1e15a 100644 --- a/packages/ui/certd-client/src/api/service.ts +++ b/packages/ui/certd-client/src/api/service.ts @@ -28,6 +28,7 @@ function createService() { // dataAxios 是 axios 返回数据中的 data const dataAxios = response.data; + // @ts-ignore if (response.config.unpack === false) { //如果不需要解包 return dataAxios; diff --git a/packages/ui/certd-client/src/components/cron-editor/index.vue b/packages/ui/certd-client/src/components/cron-editor/index.vue index d9091185..aa6e2693 100644 --- a/packages/ui/certd-client/src/components/cron-editor/index.vue +++ b/packages/ui/certd-client/src/components/cron-editor/index.vue @@ -48,6 +48,15 @@ const onUpdate = (value: string) => { if (value === props.modelValue) { return; } + const arr: string[] = value.split(" "); + if (arr[0] === "*") { + arr[0] = "0"; + } + if (arr[1] === "*") { + arr[1] = "0"; + } + value = arr.join(" "); + emit("update:modelValue", value); errorMessage.value = undefined; }; diff --git a/packages/ui/certd-client/src/router/source/modules/certd.ts b/packages/ui/certd-client/src/router/source/modules/certd.ts index 062d7055..bdab1c79 100644 --- a/packages/ui/certd-client/src/router/source/modules/certd.ts +++ b/packages/ui/certd-client/src/router/source/modules/certd.ts @@ -1,5 +1,3 @@ -import { sysResources } from "/@/router/source/modules/sys"; - export const certdResources = [ { title: "证书自动化", diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx index ca686f96..ca78cf67 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx @@ -98,7 +98,7 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre vModel: "modelValue", placeholder: "0 0 4 * * *" }, - helper: "点击上面的按钮,选择每天几点几分定时执行,后面的分秒都要选择0。\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行", + helper: "点击上面的按钮,选择每天几点定时执行。\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行", order: 100 } }, diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/trigger-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/trigger-form/index.vue index b6dacaf3..e65a3976 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/trigger-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/trigger-form/index.vue @@ -58,7 +58,7 @@ name: 'cron-editor', vModel: 'modelValue' }, - helper: '点击上面的按钮,选择每天几点几分定时执行,后面的分秒都要选择0。\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行', + helper: '点击上面的按钮,选择每天几点定时执行。\n建议设置为每天触发一次,证书未到期之前任务会跳过,不会重复执行', rules: [{ required: true, message: '此项必填' }] }" /> diff --git a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts index fae388a8..874cb730 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts @@ -306,8 +306,11 @@ export class PipelineService extends BaseService { return; } cron = cron.trim(); + if (cron.startsWith('* *')) { + cron = cron.replace('* *', '0 0'); + } if (cron.startsWith('*')) { - cron = '0' + cron.substring(1, cron.length); + cron = cron.replace('*', '0'); } const triggerId = trigger.id; const name = this.buildCronKey(pipelineId, triggerId);