diff --git a/packages/core/basic/src/utils/util.hash.ts b/packages/core/basic/src/utils/util.hash.ts index d21f5fec..44d2f97d 100644 --- a/packages/core/basic/src/utils/util.hash.ts +++ b/packages/core/basic/src/utils/util.hash.ts @@ -1,7 +1,7 @@ -import crypto from "crypto"; +import crypto from 'crypto'; function md5(data: string) { - return crypto.createHash("md5").update(data).digest("hex"); + return crypto.createHash('md5').update(data).digest('hex'); } export const hashUtils = { diff --git a/packages/core/pipeline/src/registry/registry.ts b/packages/core/pipeline/src/registry/registry.ts index 91a74ef3..c8a4a3f5 100644 --- a/packages/core/pipeline/src/registry/registry.ts +++ b/packages/core/pipeline/src/registry/registry.ts @@ -71,6 +71,9 @@ export class Registry { if (define?.deprecated) { continue; } + if (!isDev() && define.name.startsWith("demo")) { + continue; + } list.push({ ...define, key }); } } diff --git a/packages/ui/certd-client/src/api/service.ts b/packages/ui/certd-client/src/api/service.ts index ec55a840..df000c1f 100644 --- a/packages/ui/certd-client/src/api/service.ts +++ b/packages/ui/certd-client/src/api/service.ts @@ -27,6 +27,12 @@ function createService() { } // dataAxios 是 axios 返回数据中的 data const dataAxios = response.data; + + if (response.config.unpack === false) { + //如果不需要解包 + return dataAxios; + } + // 这个状态码是和后端约定的 const { code } = dataAxios; // 根据 code 进行判断 @@ -40,10 +46,6 @@ function createService() { case 0: // [ 示例 ] code === 0 代表没有错误 // @ts-ignore - if (response.config.unpack === false) { - //如果不需要解包 - return dataAxios; - } return dataAxios.data; default: // 不是正确的 code 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 e53db4d2..d9091185 100644 --- a/packages/ui/certd-client/src/components/cron-editor/index.vue +++ b/packages/ui/certd-client/src/components/cron-editor/index.vue @@ -65,6 +65,9 @@ const onError = (error: any) => { }; const nextTime = computed(() => { + if (props.modelValue == null) { + return "请先设置正确的cron表达式"; + } try { const interval = parser.parseExpression(props.modelValue); const next = interval.next().getTime(); diff --git a/packages/ui/certd-client/src/views/framework/home/dashboard/simple-steps.vue b/packages/ui/certd-client/src/components/tutorial/simple-steps.vue similarity index 100% rename from packages/ui/certd-client/src/views/framework/home/dashboard/simple-steps.vue rename to packages/ui/certd-client/src/components/tutorial/simple-steps.vue diff --git a/packages/ui/certd-client/src/components/tutorial/tutorial-steps.vue b/packages/ui/certd-client/src/components/tutorial/tutorial-steps.vue index 5bfab2f7..81ef87f3 100644 --- a/packages/ui/certd-client/src/components/tutorial/tutorial-steps.vue +++ b/packages/ui/certd-client/src/components/tutorial/tutorial-steps.vue @@ -8,6 +8,9 @@
{{ desc }}
+
+ +