[Improve] flink env check improvement (#3469)

* [Improve] flink env check improvement

* minor improve

* [Improve] check flink env improvement

* Update FlinkEnvCheckEnum.java

---------

Co-authored-by: benjobs <benjobx@gmail.com>
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java
index c8304b7..a4a663b 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/FlinkEnvController.java
@@ -17,10 +17,10 @@
 
 package org.apache.streampark.console.core.controller;
 
-import org.apache.streampark.common.enums.FlinkEnvStatus;
 import org.apache.streampark.console.base.domain.RestResponse;
 import org.apache.streampark.console.base.exception.ApiDetailException;
 import org.apache.streampark.console.core.entity.FlinkEnv;
+import org.apache.streampark.console.core.enums.FlinkEnvCheckEnum;
 import org.apache.streampark.console.core.service.FlinkEnvService;
 
 import io.swagger.v3.oas.annotations.Operation;
@@ -53,7 +53,7 @@
   @Operation(summary = "Verify flink environment")
   @PostMapping("check")
   public RestResponse check(FlinkEnv version) {
-    FlinkEnvStatus checkResp = flinkEnvService.check(version);
+    FlinkEnvCheckEnum checkResp = flinkEnvService.check(version);
     return RestResponse.success(checkResp.getCode());
   }
 
diff --git a/streampark-common/src/main/java/org/apache/streampark/common/enums/FlinkEnvStatus.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/FlinkEnvCheckEnum.java
similarity index 74%
rename from streampark-common/src/main/java/org/apache/streampark/common/enums/FlinkEnvStatus.java
rename to streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/FlinkEnvCheckEnum.java
index 8e47123..4edac0e 100644
--- a/streampark-common/src/main/java/org/apache/streampark/common/enums/FlinkEnvStatus.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/FlinkEnvCheckEnum.java
@@ -15,30 +15,33 @@
  * limitations under the License.
  */
 
-package org.apache.streampark.common.enums;
+package org.apache.streampark.console.core.enums;
+
+import lombok.Getter;
 
 /* the flink environment status */
-public enum FlinkEnvStatus {
+@Getter
+public enum FlinkEnvCheckEnum {
 
   /* FLINK_HOME path invalid */
-  INVALID(-1),
+  INVALID_PATH(-1),
 
-  /* this add/update operation are feasible */
-  FEASIBLE(0),
+  /* this add/update operation ok */
+  OK(0),
 
-  /* defined flink name repeated */
+  /* flink name repeated */
   NAME_REPEATED(1),
 
-  /* dist Jar more than one */
-  FLINK_DIST_REPEATED(2);
+  /* FLINK_DIST file not found */
+
+  FLINK_DIST_NOT_FOUND(2),
+
+  /* defined flink name repeated */
+  FLINK_DIST_REPEATED(3);
 
   private final int code;
 
-  FlinkEnvStatus(int code) {
+  FlinkEnvCheckEnum(int code) {
     this.code = code;
   }
-
-  public int getCode() {
-    return code;
-  }
 }
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/FlinkEnvService.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/FlinkEnvService.java
index 02bc04c..0c20689 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/FlinkEnvService.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/FlinkEnvService.java
@@ -17,8 +17,8 @@
 
 package org.apache.streampark.console.core.service;
 
-import org.apache.streampark.common.enums.FlinkEnvStatus;
 import org.apache.streampark.console.core.entity.FlinkEnv;
+import org.apache.streampark.console.core.enums.FlinkEnvCheckEnum;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -32,7 +32,7 @@
    * @param version The version of Flink to check.
    * @return Returns enum value indicating the existence of the specified version.
    */
-  FlinkEnvStatus check(FlinkEnv version);
+  FlinkEnvCheckEnum check(FlinkEnv version);
 
   /**
    * Create a new instance.
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkEnvServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkEnvServiceImpl.java
index 1878e63..86fef80 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkEnvServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkEnvServiceImpl.java
@@ -17,9 +17,9 @@
 
 package org.apache.streampark.console.core.service.impl;
 
-import org.apache.streampark.common.enums.FlinkEnvStatus;
 import org.apache.streampark.console.base.exception.ApiAlertException;
 import org.apache.streampark.console.core.entity.FlinkEnv;
+import org.apache.streampark.console.core.enums.FlinkEnvCheckEnum;
 import org.apache.streampark.console.core.mapper.FlinkEnvMapper;
 import org.apache.streampark.console.core.service.FlinkClusterService;
 import org.apache.streampark.console.core.service.FlinkEnvService;
@@ -52,7 +52,7 @@
    * 2) flink-dist repeated <br>
    */
   @Override
-  public FlinkEnvStatus check(FlinkEnv version) {
+  public FlinkEnvCheckEnum check(FlinkEnv version) {
     // 1) check name
     LambdaQueryWrapper<FlinkEnv> queryWrapper =
         new LambdaQueryWrapper<FlinkEnv>().eq(FlinkEnv::getFlinkName, version.getFlinkName());
@@ -60,21 +60,27 @@
       queryWrapper.ne(FlinkEnv::getId, version.getId());
     }
     if (this.count(queryWrapper) > 0) {
-      return FlinkEnvStatus.NAME_REPEATED;
+      return FlinkEnvCheckEnum.NAME_REPEATED;
     }
 
-    // 2) check dist_jar
     String lib = version.getFlinkHome().concat("/lib");
     File flinkLib = new File(lib);
-    if (flinkLib.exists() && flinkLib.isDirectory()) {
-      int distSize = flinkLib.listFiles(f -> f.getName().matches("flink-dist.*\\.jar")).length;
-      if (distSize > 1) {
-        return FlinkEnvStatus.FLINK_DIST_REPEATED;
-      }
-    } else {
-      return FlinkEnvStatus.INVALID;
+    // 2) flink/lib path exists and is a directory
+    if (!flinkLib.exists() || !flinkLib.isDirectory()) {
+      return FlinkEnvCheckEnum.INVALID_PATH;
     }
-    return FlinkEnvStatus.FEASIBLE;
+
+    // 3) check flink-dist
+    File[] files = flinkLib.listFiles(f -> f.getName().matches("flink-dist.*\\.jar"));
+    if (files == null || files.length == 0) {
+      return FlinkEnvCheckEnum.FLINK_DIST_NOT_FOUND;
+    }
+
+    if (files.length > 1) {
+      return FlinkEnvCheckEnum.FLINK_DIST_REPEATED;
+    }
+
+    return FlinkEnvCheckEnum.OK;
   }
 
   @Override
diff --git a/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue b/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
index d4e0ce1..19ba3b1 100644
--- a/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
+++ b/streampark-console/streampark-console-webapp/src/components/Application/src/AppDarkModeToggle.vue
@@ -63,9 +63,7 @@
       height: 18px;
       background-color: #fff;
       border-radius: 50%;
-      transition:
-        transform 0.5s,
-        background-color 0.5s;
+      transition: transform 0.5s, background-color 0.5s;
       will-change: transform;
     }
 
diff --git a/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue b/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
index 78cac5c..e08c25f 100644
--- a/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
+++ b/streampark-console/streampark-console-webapp/src/components/ContextMenu/src/ContextMenu.vue
@@ -179,9 +179,7 @@
     background-color: @component-background;
     border: 1px solid rgb(0 0 0 / 8%);
     border-radius: 0.25rem;
-    box-shadow:
-      0 2px 2px 0 rgb(0 0 0 / 14%),
-      0 3px 1px -2px rgb(0 0 0 / 10%),
+    box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%),
       0 1px 5px 0 rgb(0 0 0 / 6%);
     background-clip: padding-box;
     user-select: none;
diff --git a/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue b/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
index e5a9dac..1cd7e38 100644
--- a/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
+++ b/streampark-console/streampark-console-webapp/src/components/Form/src/BasicForm.vue
@@ -113,7 +113,7 @@
       });
 
       const getBindValue = computed(
-        () => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable,
+        () => ({ ...attrs, ...props, ...unref(getProps) } as Recordable),
       );
 
       const getSchema = computed((): FormSchema[] => {
diff --git a/streampark-console/streampark-console-webapp/src/components/Form/src/components/FormItem.vue b/streampark-console/streampark-console-webapp/src/components/Form/src/components/FormItem.vue
index 9bbb502..137ae94 100644
--- a/streampark-console/streampark-console-webapp/src/components/Form/src/components/FormItem.vue
+++ b/streampark-console/streampark-console-webapp/src/components/Form/src/components/FormItem.vue
@@ -333,8 +333,8 @@
             return slot
               ? getSlot(slots, slot, unref(getValues))
               : render
-                ? render(unref(getValues))
-                : renderComponent();
+              ? render(unref(getValues))
+              : renderComponent();
           };
 
           const showSuffix = !!suffix;
@@ -382,8 +382,8 @@
           return colSlot
             ? getSlot(slots, colSlot, values)
             : renderColContent
-              ? renderColContent(values)
-              : renderItem();
+            ? renderColContent(values)
+            : renderItem();
         };
 
         return (
diff --git a/streampark-console/streampark-console-webapp/src/components/Modal/src/components/ModalWrapper.vue b/streampark-console/streampark-console-webapp/src/components/Modal/src/components/ModalWrapper.vue
index 52c8b5e..1b1b9a6 100644
--- a/streampark-console/streampark-console-webapp/src/components/Modal/src/components/ModalWrapper.vue
+++ b/streampark-console/streampark-console-webapp/src/components/Modal/src/components/ModalWrapper.vue
@@ -153,8 +153,8 @@
             realHeightRef.value = props.height
               ? props.height
               : realHeight > maxHeight
-                ? maxHeight
-                : realHeight;
+              ? maxHeight
+              : realHeight;
           }
           emit('height-change', unref(realHeightRef));
         } catch (error) {
diff --git a/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue b/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
index 8fdbc8f..e89a6ce 100644
--- a/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
+++ b/streampark-console/streampark-console-webapp/src/components/Page/src/PageFooter.vue
@@ -39,9 +39,7 @@
     line-height: 44px;
     background-color: @component-background;
     border-top: 1px solid @border-color-base;
-    box-shadow:
-      0 -6px 16px -8px rgb(0 0 0 / 8%),
-      0 -9px 28px 0 rgb(0 0 0 / 5%),
+    box-shadow: 0 -6px 16px -8px rgb(0 0 0 / 8%), 0 -9px 28px 0 rgb(0 0 0 / 5%),
       0 -12px 48px 16px rgb(0 0 0 / 3%);
     transition: width 0.2s;
 
diff --git a/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue b/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
index 36ab854..35c0802 100644
--- a/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
+++ b/streampark-console/streampark-console-webapp/src/components/Table/src/components/HeaderCell.vue
@@ -22,7 +22,7 @@
     props: {
       column: {
         type: Object as PropType<BasicColumn>,
-        default: () => ({}) as BasicColumn,
+        default: () => ({} as BasicColumn),
       },
     },
     setup(props) {
diff --git a/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts b/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
index 7a2359c..6098378 100644
--- a/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
+++ b/streampark-console/streampark-console-webapp/src/enums/flinkEnum.ts
@@ -235,9 +235,10 @@
   INVALID = 4,
 }
 
-export enum FlinkEvnEnum {
-  INVALID = -1,
-  FEASIBLE = 0,
+export enum FlinkEnvCheckEnum {
+  INVALID_PATH = -1,
+  OK = 0,
   NAME_REPEATED = 1,
- FLINK_DIST_REPEATED = 2,
+  FLINK_DIST_NOT_FOUND = 2,
+  FLINK_DIST_REPEATED = 3,
 }
diff --git a/streampark-console/streampark-console-webapp/src/hooks/setting/useMenuSetting.ts b/streampark-console/streampark-console-webapp/src/hooks/setting/useMenuSetting.ts
index f501c6e..3566bfd 100644
--- a/streampark-console/streampark-console-webapp/src/hooks/setting/useMenuSetting.ts
+++ b/streampark-console/streampark-console-webapp/src/hooks/setting/useMenuSetting.ts
@@ -105,8 +105,8 @@
     return siderHidden
       ? 0
       : collapsedShowTitle
-        ? SIDE_BAR_SHOW_TIT_MINI_WIDTH
-        : SIDE_BAR_MINI_WIDTH;
+      ? SIDE_BAR_SHOW_TIT_MINI_WIDTH
+      : SIDE_BAR_MINI_WIDTH;
   });
 
   const getCalcContentWidth = computed(() => {
@@ -114,9 +114,9 @@
       unref(getIsTopMenu) || !unref(getShowMenu) || (unref(getSplit) && unref(getMenuHidden))
         ? 0
         : unref(getIsMixSidebar)
-          ? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) +
-            (unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0)
-          : unref(getRealWidth);
+        ? (unref(getCollapsed) ? SIDE_BAR_MINI_WIDTH : SIDE_BAR_SHOW_TIT_MINI_WIDTH) +
+          (unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0)
+        : unref(getRealWidth);
 
     return `calc(100% - ${unref(width)}px)`;
   });
diff --git a/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts b/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
index 9a66074..c543be9 100644
--- a/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
+++ b/streampark-console/streampark-console-webapp/src/hooks/web/useLockPage.ts
@@ -32,12 +32,9 @@
     }
     clear();
 
-    timeId = setTimeout(
-      () => {
-        lockPage();
-      },
-      lockTime * 60 * 1000,
-    );
+    timeId = setTimeout(() => {
+      lockPage();
+    }, lockTime * 60 * 1000);
   }
 
   function lockPage(): void {
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/setting/flinkHome.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/setting/flinkHome.ts
index e4b2f77..c847e2d 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/setting/flinkHome.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/setting/flinkHome.ts
@@ -28,11 +28,13 @@
   descriptionPlaceholder: 'Please enter description',
   operateMessage: {
     flinkNameTips: 'the flink name, e.g: flink-1.12',
-    flinkNameIsUnique: 'flink name is already exists',
+    flinkNameIsRepeated: 'flink name is already exists',
     flinkNameIsRequired: 'flink name is required',
     flinkHomeTips: 'The absolute path of the FLINK_HOME',
     flinkHomeIsRequired: 'flink home is required',
-    flinkDistIsRepeated: 'FLINK_HOME error: can no found flink-dist or found multiple flink-dist.',
+    flinkHomePathIsInvalid: 'flink home path is invalid',
+    flinkDistNotFound: 'can no found flink-dist in FLINK_HOME/lib',
+    flinkDistIsRepeated: 'found multiple flink-dist in FLINK_HOME/lib, Must be only one',
     createFlinkHomeSuccessful: ' create successful!',
     updateFlinkHomeSuccessful: ' update successful!',
   },
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/setting/flinkHome.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/setting/flinkHome.ts
index 20c1f75..c69f599 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/setting/flinkHome.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/setting/flinkHome.ts
@@ -31,8 +31,10 @@
     flinkNameIsRepeated: 'Flink名称已存在',
     flinkNameIsRequired: 'Flink名称必填',
     flinkHomeTips: 'Flink所在服务器的绝对路径,举例: /usr/local/flink',
-    flinkHomeIsRequired: 'Flink安装路径必填',
-    flinkDistIsRepeated: 'flink/lib 路径下有且只能有一个flink-dist jar文件,当前未找到或找到多个,请检查!',
+    flinkHomeIsRequired: 'Flink Home必填',
+    flinkHomePathIsInvalid: 'Flink Home路径无效',
+    flinkDistNotFound: 'flink/lib 路径下未找到 flink-dist jar文件',
+    flinkDistIsRepeated: 'flink/lib 路径下存在多个flink-dist jar文件, 必须只能有一个!',
     createFlinkHomeSuccessful: ' 创建成功!',
     updateFlinkHomeSuccessful: ' 更新成功!',
   },
diff --git a/streampark-console/streampark-console-webapp/src/utils/props.ts b/streampark-console/streampark-console-webapp/src/utils/props.ts
index 4a5491b..4a15ec4 100644
--- a/streampark-console/streampark-console-webapp/src/utils/props.ts
+++ b/streampark-console/streampark-console-webapp/src/utils/props.ts
@@ -28,8 +28,8 @@
   default?: R extends true
     ? never
     : D extends Record<string, unknown> | Array<any>
-      ? () => D
-      : (() => D) | D;
+    ? () => D
+    : (() => D) | D;
   validator?: ((val: any) => val is C) | ((val: any) => boolean);
 };
 
@@ -37,8 +37,8 @@
   | (T extends PropWrapper<unknown>
       ? T[typeof wrapperKey]
       : [V] extends [never]
-        ? ResolvePropTypeWithReadonly<T>
-        : never)
+      ? ResolvePropTypeWithReadonly<T>
+      : never)
   | V
   | C;
 export type BuildPropType<T, V, C> = _BuildPropType<
@@ -53,8 +53,8 @@
 ]
   ? D
   : D extends () => T
-    ? ReturnType<D>
-    : D;
+  ? ReturnType<D>
+  : D;
 
 export type BuildPropDefault<T, D, R> = R extends true
   ? { readonly default?: undefined }
@@ -146,12 +146,12 @@
     [K in keyof O]: O[K] extends BuildPropReturn<any, any, any, any, any>
       ? O[K]
       : [O[K]] extends NativePropType
-        ? O[K]
-        : O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C>
-          ? D extends BuildPropType<T, V, C>
-            ? BuildPropOption<T, D, R, V, C>
-            : never
-          : never;
+      ? O[K]
+      : O[K] extends BuildPropOption<infer T, infer D, infer R, infer V, infer C>
+      ? D extends BuildPropType<T, V, C>
+        ? BuildPropOption<T, D, R, V, C>
+        : never
+      : never;
   },
 >(
   props: O,
@@ -162,20 +162,20 @@
     [K in keyof O]: O[K] extends { [propKey]: boolean }
       ? O[K]
       : [O[K]] extends NativePropType
-        ? O[K]
-        : O[K] extends BuildPropOption<
-              infer T,
-              // eslint-disable-next-line @typescript-eslint/no-unused-vars
-              infer _D,
-              infer R,
-              infer V,
-              infer C
-            >
-          ? BuildPropReturn<T, O[K]['default'], R, V, C>
-          : never;
+      ? O[K]
+      : O[K] extends BuildPropOption<
+          infer T,
+          // eslint-disable-next-line @typescript-eslint/no-unused-vars
+          infer _D,
+          infer R,
+          infer V,
+          infer C
+        >
+      ? BuildPropReturn<T, O[K]['default'], R, V, C>
+      : never;
   };
 
-export const definePropType = <T>(val: any) => ({ [wrapperKey]: val }) as PropWrapper<T>;
+export const definePropType = <T>(val: any) => ({ [wrapperKey]: val } as PropWrapper<T>);
 
 export const keyOf = <T extends Object>(arr: T) => Object.keys(arr) as Array<keyof T>;
 export const mutable = <T extends readonly any[] | Record<string, unknown>>(val: T) =>
diff --git a/streampark-console/streampark-console-webapp/src/views/base/error-log/data.tsx b/streampark-console/streampark-console-webapp/src/views/base/error-log/data.tsx
index 73120a4..3ffc2f4 100644
--- a/streampark-console/streampark-console-webapp/src/views/base/error-log/data.tsx
+++ b/streampark-console/streampark-console-webapp/src/views/base/error-log/data.tsx
@@ -16,12 +16,12 @@
           text === ErrorTypeEnum.VUE
             ? 'green'
             : text === ErrorTypeEnum.RESOURCE
-              ? 'cyan'
-              : text === ErrorTypeEnum.PROMISE
-                ? 'blue'
-                : ErrorTypeEnum.AJAX
-                  ? 'red'
-                  : 'purple';
+            ? 'cyan'
+            : text === ErrorTypeEnum.PROMISE
+            ? 'blue'
+            : ErrorTypeEnum.AJAX
+            ? 'red'
+            : 'purple';
         return <Tag color={color}>{() => text}</Tag>;
       },
     },
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/home/components/Modal.vue b/streampark-console/streampark-console-webapp/src/views/flink/home/components/Modal.vue
index 1cd7264..d53259c 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/home/components/Modal.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/home/components/Modal.vue
@@ -29,7 +29,7 @@
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { fetchCheckEnv, fetchFlinkCreate, fetchFlinkUpdate } from '/@/api/flink/flinkEnv';
-  import { FlinkEvnEnum } from '/@/enums/flinkEnum';
+  import { FlinkEnvCheckEnum } from '/@/enums/flinkEnum';
   const emit = defineEmits(['reload', 'register']);
   const versionId = ref<string | null>(null);
   const { t } = useI18n();
@@ -100,16 +100,24 @@
       flinkHome: formValue.flinkHome,
     });
     const checkResp = parseInt(resp.data);
-    if (checkResp !== FlinkEvnEnum.FEASIBLE) {
+    if (checkResp !== FlinkEnvCheckEnum.OK) {
       switch (checkResp) {
-        case FlinkEvnEnum.INVALID:
-          Swal.fire('Failed', t('setting.flinkHome.operateMessage.flinkHomePathIsInvalid'), 'error');
+        case FlinkEnvCheckEnum.INVALID_PATH:
+          Swal.fire(
+            'Failed',
+            t('setting.flinkHome.operateMessage.flinkHomePathIsInvalid'),
+            'error',
+          );
           break;
-        case FlinkEvnEnum.NAME_REPEATED:
+        case FlinkEnvCheckEnum.NAME_REPEATED:
           Swal.fire('Failed', t('setting.flinkHome.operateMessage.flinkNameIsRepeated'), 'error');
           break;
-        case FlinkEvnEnum.FLINK_DIST_REPEATED:
+        case FlinkEnvCheckEnum.FLINK_DIST_NOT_FOUND:
+          Swal.fire('Failed', t('setting.flinkHome.operateMessage.flinkDistNotFound'), 'error');
+          break;
+        case FlinkEnvCheckEnum.FLINK_DIST_REPEATED:
           Swal.fire('Failed', t('setting.flinkHome.operateMessage.flinkDistIsRepeated'), 'error');
+          break;
       }
       changeOkLoading(false);
       return;