You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/12/06 06:10:50 UTC
[incubator-streampark] branch dev updated: [Fix]: add kubernetesClusterId pattern (#2134)
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 9e795e6ab [Fix]: add kubernetesClusterId pattern (#2134)
9e795e6ab is described below
commit 9e795e6ab583adc376e54ea70893fc4b8f773427
Author: WSZ <12...@qq.com>
AuthorDate: Tue Dec 6 14:10:44 2022 +0800
[Fix]: add kubernetesClusterId pattern (#2134)
* [Fix]: add kubernetesClusterId pattern
* [Build]: Update dependencies,improve page performance
* [fix]: update rule message
---
.../streampark-console-webapp/package.json | 85 +++++++------
.../src/hooks/web/useECharts.ts | 137 ---------------------
.../src/hooks/web/useScript.ts | 62 ----------
.../src/hooks/web/useWatermark.ts | 116 -----------------
.../src/locales/lang/en/flink/app.ts | 1 +
.../src/locales/lang/zh-CN/flink/app.ts | 3 +-
.../streampark-console-webapp/src/main.ts | 5 +
.../src/utils/lib/echarts.ts | 73 -----------
.../src/utils/propTypes.ts | 14 ---
.../flink/app/hooks/useCreateAndEditSchema.ts | 8 +-
.../streampark-console-webapp/vite.config.ts | 3 +
11 files changed, 59 insertions(+), 448 deletions(-)
diff --git a/streampark-console/streampark-console-webapp/package.json b/streampark-console/streampark-console-webapp/package.json
index 5a2cb4c2a..9f27e075c 100644
--- a/streampark-console/streampark-console-webapp/package.json
+++ b/streampark-console/streampark-console-webapp/package.json
@@ -32,85 +32,84 @@
"dependencies": {
"@ant-design/colors": "^6.0.0",
"@ant-design/icons-vue": "^6.1.0",
- "@iconify/iconify": "^3.0.0",
- "@vue/runtime-core": "^3.2.41",
- "@vue/shared": "^3.2.41",
- "@vueuse/core": "^9.3.1",
- "@vueuse/shared": "^9.3.1",
+ "@iconify/iconify": "^3.0.1",
+ "@vue/runtime-core": "^3.2.45",
+ "@vue/shared": "^3.2.45",
+ "@vueuse/core": "^9.6.0",
+ "@vueuse/shared": "^9.6.0",
"@zxcvbn-ts/core": "^2.1.0",
- "ant-design-vue": "^3.2.14",
- "axios": "^1.1.3",
- "cropperjs": "^1.5.12",
+ "ant-design-vue": "^3.2.15",
+ "axios": "^1.2.1",
+ "cropperjs": "^1.5.13",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.6",
- "echarts": "^5.4.0",
"lodash-es": "^4.17.21",
"monaco-editor": "^0.34.1",
"nprogress": "^0.2.0",
"path-to-regexp": "^6.2.1",
"penpal": "^6.2.2",
- "pinia": "2.0.23",
+ "pinia": "2.0.27",
"qs": "^6.11.0",
"resize-observer-polyfill": "^1.5.1",
"sql-formatter": "^4.0.2",
"sweetalert2": "^11.4.18",
"sortablejs": "^1.15.0",
- "terser": "^5.15.1",
- "vue": "^3.2.41",
+ "terser": "^5.16.1",
+ "vue": "^3.2.45",
"vue-i18n": "^9.2.2",
- "vue-router": "^4.1.5",
- "vue-types": "^4.2.1"
+ "vue-router": "^4.1.6",
+ "vue-types": "^5.0.1"
},
"devDependencies": {
- "@commitlint/cli": "^17.1.2",
- "@commitlint/config-conventional": "^17.1.0",
- "@iconify/json": "^2.1.126",
+ "@commitlint/cli": "^17.3.0",
+ "@commitlint/config-conventional": "^17.3.0",
+ "@iconify/json": "^2.1.148",
"@purge-icons/generated": "^0.9.0",
"@types/crypto-js": "^4.1.1",
"@types/fs-extra": "^9.0.13",
"@types/lodash-es": "^4.17.6",
- "@types/node": "^17.0.25",
+ "@types/node": "^18.11.11",
"@types/nprogress": "^0.2.0",
"@types/qs": "^6.9.7",
"@types/showdown": "^2.0.0",
"@types/sortablejs": "^1.15.0",
- "@typescript-eslint/eslint-plugin": "^5.40.1",
- "@typescript-eslint/parser": "^5.40.1",
- "@vitejs/plugin-legacy": "^2.2.0",
- "@vitejs/plugin-vue": "^3.1.2",
- "@vitejs/plugin-vue-jsx": "^2.0.1",
- "@vue/compiler-sfc": "^3.2.33",
- "@vue/test-utils": "^2.1.0",
- "autoprefixer": "^10.4.12",
+ "@typescript-eslint/eslint-plugin": "^5.45.1",
+ "@typescript-eslint/parser": "^5.45.1",
+ "@vitejs/plugin-legacy": "^2.3.1",
+ "@vitejs/plugin-vue": "^3.2.0",
+ "@vitejs/plugin-vue-jsx": "^2.1.1",
+ "@vue/compiler-sfc": "^3.2.45",
+ "@vue/test-utils": "^2.2.6",
+ "autoprefixer": "^10.4.13",
"commitizen": "^4.2.5",
"conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3",
"dotenv": "^16.0.3",
- "eslint": "^8.23.1",
+ "eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
- "eslint-plugin-prettier": "^4.0.0",
- "eslint-plugin-vue": "^8.6.0",
- "esno": "^0.14.1",
- "fs-extra": "^10.1.0",
- "less": "^4.1.2",
- "lint-staged": "12.3.7",
+ "eslint-plugin-prettier": "^4.2.1",
+ "eslint-plugin-vue": "^9.8.0",
+ "esno": "^0.16.3",
+ "fs-extra": "^11.1.0",
+ "less": "^4.1.3",
+ "lint-staged": "13.1.0",
"picocolors": "^1.0.0",
- "postcss": "^8.4.18",
+ "postcss": "^8.4.19",
"postcss-html": "^1.5.0",
"postcss-less": "^6.0.0",
- "prettier": "^2.7.1",
+ "prettier": "^2.8.0",
"rimraf": "^3.0.2",
- "rollup": "^3.2.3",
+ "rollup": "^3.6.0",
"rollup-plugin-visualizer": "^5.8.3",
- "stylelint": "^14.7.1",
- "stylelint-config-prettier": "^9.0.3",
- "stylelint-config-recommended": "^7.0.0",
+ "stylelint": "^14.16.0",
+ "stylelint-config-prettier": "^9.0.4",
+ "stylelint-config-recommended": "^9.0.0",
"stylelint-config-recommended-vue": "^1.4.0",
- "stylelint-config-standard": "^25.0.0",
+ "stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0",
"ts-node": "^10.9.1",
- "typescript": "^4.8.3",
- "vite": "~3.0.2",
+ "typescript": "^4.9.3",
+ "vite": "^3.2.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-imagemin": "^0.6.1",
@@ -120,7 +119,7 @@
"vite-plugin-theme": "^0.8.6",
"vite-plugin-windicss": "^1.8.8",
"vue-eslint-parser": "^9.1.0",
- "vue-tsc": "^1.0.9"
+ "vue-tsc": "^1.0.11"
},
"resolutions": {
"bin-wrapper": "npm:bin-wrapper-china",
diff --git a/streampark-console/streampark-console-webapp/src/hooks/web/useECharts.ts b/streampark-console/streampark-console-webapp/src/hooks/web/useECharts.ts
deleted file mode 100644
index 2c7497187..000000000
--- a/streampark-console/streampark-console-webapp/src/hooks/web/useECharts.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import type { EChartsOption } from 'echarts';
-import type { Ref } from 'vue';
-import { useTimeoutFn } from '/@/hooks/core/useTimeout';
-import { tryOnUnmounted } from '@vueuse/core';
-import { unref, nextTick, watch, computed, ref } from 'vue';
-import { useDebounceFn } from '@vueuse/core';
-import { useEventListener } from '/@/hooks/event/useEventListener';
-import { useBreakpoint } from '/@/hooks/event/useBreakpoint';
-import echarts from '/@/utils/lib/echarts';
-import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-
-export function useECharts(
- elRef: Ref<HTMLDivElement>,
- theme: 'light' | 'dark' | 'default' = 'default',
-) {
- const { getDarkMode: getSysDarkMode } = useRootSetting();
-
- const getDarkMode = computed(() => {
- return theme === 'default' ? getSysDarkMode.value : theme;
- });
- let chartInstance: echarts.ECharts | null = null;
- let resizeFn: Fn = resize;
- const cacheOptions = ref({}) as Ref<EChartsOption>;
- let removeResizeFn: Fn = () => {};
-
- resizeFn = useDebounceFn(resize, 200);
-
- const getOptions = computed(() => {
- if (getDarkMode.value !== 'dark') {
- return cacheOptions.value as EChartsOption;
- }
- return {
- backgroundColor: 'transparent',
- ...cacheOptions.value,
- } as EChartsOption;
- });
-
- function initCharts(t = theme) {
- const el = unref(elRef);
- if (!el || !unref(el)) {
- return;
- }
-
- chartInstance = echarts.init(el, t);
- const { removeEvent } = useEventListener({
- el: window,
- name: 'resize',
- listener: resizeFn,
- });
- removeResizeFn = removeEvent;
- const { widthRef, screenEnum } = useBreakpoint();
- if (unref(widthRef) <= screenEnum.MD || el.offsetHeight === 0) {
- useTimeoutFn(() => {
- resizeFn();
- }, 30);
- }
- }
-
- function setOptions(options: EChartsOption, clear = true) {
- cacheOptions.value = options;
- if (unref(elRef)?.offsetHeight === 0) {
- useTimeoutFn(() => {
- setOptions(unref(getOptions));
- }, 30);
- return;
- }
- nextTick(() => {
- useTimeoutFn(() => {
- if (!chartInstance) {
- initCharts(getDarkMode.value as 'default');
-
- if (!chartInstance) return;
- }
- clear && chartInstance?.clear();
-
- chartInstance?.setOption(unref(getOptions));
- }, 30);
- });
- }
-
- function resize() {
- chartInstance?.resize({
- animation: {
- duration: 300,
- easing: 'quadraticIn',
- },
- });
- }
-
- watch(
- () => getDarkMode.value,
- (theme) => {
- if (chartInstance) {
- chartInstance.dispose();
- initCharts(theme as 'default');
- setOptions(cacheOptions.value);
- }
- },
- );
-
- tryOnUnmounted(() => {
- if (!chartInstance) return;
- removeResizeFn();
- chartInstance.dispose();
- chartInstance = null;
- });
-
- function getInstance(): echarts.ECharts | null {
- if (!chartInstance) {
- initCharts(getDarkMode.value as 'default');
- }
- return chartInstance;
- }
-
- return {
- setOptions,
- resize,
- echarts,
- getInstance,
- };
-}
diff --git a/streampark-console/streampark-console-webapp/src/hooks/web/useScript.ts b/streampark-console/streampark-console-webapp/src/hooks/web/useScript.ts
deleted file mode 100644
index 737f0e00d..000000000
--- a/streampark-console/streampark-console-webapp/src/hooks/web/useScript.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { onMounted, onUnmounted, ref } from 'vue';
-
-interface ScriptOptions {
- src: string;
-}
-
-export function useScript(opts: ScriptOptions) {
- const isLoading = ref(false);
- const error = ref(false);
- const success = ref(false);
- let script: HTMLScriptElement;
-
- const promise = new Promise((resolve, reject) => {
- onMounted(() => {
- script = document.createElement('script');
- script.type = 'text/javascript';
- script.onload = function () {
- isLoading.value = false;
- success.value = true;
- error.value = false;
- resolve('');
- };
-
- script.onerror = function (err) {
- isLoading.value = false;
- success.value = false;
- error.value = true;
- reject(err);
- };
-
- script.src = opts.src;
- document.head.appendChild(script);
- });
- });
-
- onUnmounted(() => {
- script && script.remove();
- });
-
- return {
- isLoading,
- error,
- success,
- toPromise: () => promise,
- };
-}
diff --git a/streampark-console/streampark-console-webapp/src/hooks/web/useWatermark.ts b/streampark-console/streampark-console-webapp/src/hooks/web/useWatermark.ts
deleted file mode 100644
index ccbf47652..000000000
--- a/streampark-console/streampark-console-webapp/src/hooks/web/useWatermark.ts
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { getCurrentInstance, onBeforeUnmount, ref, Ref, shallowRef, unref } from 'vue';
-import { useRafThrottle } from '/@/utils/domUtils';
-import { addResizeListener, removeResizeListener } from '/@/utils/event';
-import { isDef } from '/@/utils/is';
-
-const domSymbol = Symbol('watermark-dom');
-
-export function useWatermark(
- appendEl: Ref<HTMLElement | null> = ref(document.body) as Ref<HTMLElement>,
-) {
- const func = useRafThrottle(function () {
- const el = unref(appendEl);
- if (!el) return;
- const { clientHeight: height, clientWidth: width } = el;
- updateWatermark({ height, width });
- });
- const id = domSymbol.toString();
- const watermarkEl = shallowRef<HTMLElement>();
-
- const clear = () => {
- const domId = unref(watermarkEl);
- watermarkEl.value = undefined;
- const el = unref(appendEl);
- if (!el) return;
- domId && el.removeChild(domId);
- removeResizeListener(el, func);
- };
-
- function createBase64(str: string) {
- const can = document.createElement('canvas');
- const width = 300;
- const height = 240;
- Object.assign(can, { width, height });
-
- const cans = can.getContext('2d');
- if (cans) {
- cans.rotate((-20 * Math.PI) / 120);
- cans.font = '15px Vedana';
- cans.fillStyle = 'rgba(0, 0, 0, 0.15)';
- cans.textAlign = 'left';
- cans.textBaseline = 'middle';
- cans.fillText(str, width / 20, height);
- }
- return can.toDataURL('image/png');
- }
-
- function updateWatermark(
- options: {
- width?: number;
- height?: number;
- str?: string;
- } = {},
- ) {
- const el = unref(watermarkEl);
- if (!el) return;
- if (isDef(options.width)) {
- el.style.width = `${options.width}px`;
- }
- if (isDef(options.height)) {
- el.style.height = `${options.height}px`;
- }
- if (isDef(options.str)) {
- el.style.background = `url(${createBase64(options.str)}) left top repeat`;
- }
- }
-
- const createWatermark = (str: string) => {
- if (unref(watermarkEl)) {
- updateWatermark({ str });
- return id;
- }
- const div = document.createElement('div');
- watermarkEl.value = div;
- div.id = id;
- div.style.pointerEvents = 'none';
- div.style.top = '0px';
- div.style.left = '0px';
- div.style.position = 'absolute';
- div.style.zIndex = '100000';
- const el = unref(appendEl);
- if (!el) return id;
- const { clientHeight: height, clientWidth: width } = el;
- updateWatermark({ str, width, height });
- el.appendChild(div);
- return id;
- };
-
- function setWatermark(str: string) {
- createWatermark(str);
- addResizeListener(document.documentElement, func);
- const instance = getCurrentInstance();
- if (instance) {
- onBeforeUnmount(() => {
- clear();
- });
- }
- }
-
- return { setWatermark, clear };
-}
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
index acddee027..17bbcbfcb 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts
@@ -213,6 +213,7 @@ export default {
descriptionPlaceholder: 'Please enter description for this application',
kubernetesNamespacePlaceholder: 'Please enter kubernetes Namespace, e.g: default',
kubernetesClusterIdPlaceholder: 'Please enter Kubernetes clusterId',
+ kubernetesClusterIdRequire: "lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character",
kubernetesClusterIdIsRequiredMessage: 'Kubernetes clusterId is required',
flinkImagePlaceholder:
'Please enter the tag of Flink base docker image, such as: flink:1.13.0-scala_2.11-java8',
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
index e0eeda899..25450eb70 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/app.ts
@@ -208,8 +208,9 @@ export default {
descriptionPlaceholder: '请输入此应用程序的描述',
kubernetesNamespacePlaceholder: '请输入K8S命名空间, 如: default',
kubernetesClusterIdPlaceholder: '请选择K8S ClusterId',
+ kubernetesClusterIdRequire: "小写字母、数字、“-”或“.”,并且必须以字母数字字符开头和结尾",
kubernetesClusterIdIsRequiredMessage: 'K8S ClusterId必填',
- flinkImagePlaceholder: '请输入Flink基础docker镜像的标签,如:flink:1.13.0-scala_2.11-java8',
+ flinkImagePlaceholder: '请输入Flink基础docker镜像的标签,如:flink:1.13.0-scala_2.11-java8',
flinkImageIsRequiredMessage: 'Flink基础docker镜像是必填的',
k8sRestExposedTypePlaceholder: 'K8S服务对外类型',
hadoopXmlConfigFileTips: '从系统环境参数自动复制配置文件',
diff --git a/streampark-console/streampark-console-webapp/src/main.ts b/streampark-console/streampark-console-webapp/src/main.ts
index 0bb3b7ca1..1f7ed376c 100644
--- a/streampark-console/streampark-console-webapp/src/main.ts
+++ b/streampark-console/streampark-console-webapp/src/main.ts
@@ -31,6 +31,11 @@ import { setupGlobDirectives } from '/@/directives';
import { setupI18n } from '/@/locales/setupI18n';
import { registerGlobComp } from '/@/components/registerGlobComp';
+import { isDevMode } from './utils/env';
+
+if (isDevMode()) {
+ import('ant-design-vue/es/style');
+}
async function bootstrap() {
const app = createApp(App);
diff --git a/streampark-console/streampark-console-webapp/src/utils/lib/echarts.ts b/streampark-console/streampark-console-webapp/src/utils/lib/echarts.ts
deleted file mode 100644
index 383c3965c..000000000
--- a/streampark-console/streampark-console-webapp/src/utils/lib/echarts.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import * as echarts from 'echarts/core';
-
-import {
- BarChart,
- LineChart,
- PieChart,
- MapChart,
- PictorialBarChart,
- RadarChart,
- ScatterChart,
-} from 'echarts/charts';
-
-import {
- TitleComponent,
- TooltipComponent,
- GridComponent,
- PolarComponent,
- AriaComponent,
- ParallelComponent,
- LegendComponent,
- RadarComponent,
- ToolboxComponent,
- DataZoomComponent,
- VisualMapComponent,
- TimelineComponent,
- CalendarComponent,
- GraphicComponent,
-} from 'echarts/components';
-
-import { SVGRenderer } from 'echarts/renderers';
-
-echarts.use([
- LegendComponent,
- TitleComponent,
- TooltipComponent,
- GridComponent,
- PolarComponent,
- AriaComponent,
- ParallelComponent,
- BarChart,
- LineChart,
- PieChart,
- MapChart,
- RadarChart,
- SVGRenderer,
- PictorialBarChart,
- RadarComponent,
- ToolboxComponent,
- DataZoomComponent,
- VisualMapComponent,
- TimelineComponent,
- CalendarComponent,
- GraphicComponent,
- ScatterChart,
-]);
-
-export default echarts;
diff --git a/streampark-console/streampark-console-webapp/src/utils/propTypes.ts b/streampark-console/streampark-console-webapp/src/utils/propTypes.ts
index 8d803ec04..60290e44d 100644
--- a/streampark-console/streampark-console-webapp/src/utils/propTypes.ts
+++ b/streampark-console/streampark-console-webapp/src/utils/propTypes.ts
@@ -33,18 +33,4 @@ const propTypes = createTypes({
object: undefined,
integer: undefined,
}) as PropTypes;
-
-propTypes.extend([
- {
- name: 'style',
- getter: true,
- type: [String, Object],
- default: undefined,
- },
- {
- name: 'VNodeChild',
- getter: true,
- type: undefined,
- },
-]);
export { propTypes };
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
index 7bf0f08cd..c2adfe438 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
+++ b/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
@@ -248,13 +248,17 @@ export const useCreateAndEditSchema = (
component: 'Input',
componentProps: ({ formModel }) => {
return {
- placeholder: t('flink.app.addAppTips.kubernetesClusterIdPlaceholder'),
+ placeholder: t('flink.app.addAppTips.kubernetesClusterIdRequire'),
onChange: (e: ChangeEvent) => (formModel.jobName = e.target.value),
};
},
ifShow: ({ values }) => values.executionMode == ExecModeEnum.KUBERNETES_APPLICATION,
rules: [
- { required: true, message: t('flink.app.addAppTips.kubernetesClusterIdPlaceholder') },
+ {
+ required: true,
+ message: t('flink.app.addAppTips.kubernetesClusterIdRequire'),
+ pattern:/^[a-z0-9]([a-z0-9_\.]+)?[a-z0-9]$/
+ },
],
},
{
diff --git a/streampark-console/streampark-console-webapp/vite.config.ts b/streampark-console/streampark-console-webapp/vite.config.ts
index 33ea92570..93cc71576 100644
--- a/streampark-console/streampark-console-webapp/vite.config.ts
+++ b/streampark-console/streampark-console-webapp/vite.config.ts
@@ -115,6 +115,9 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
// Suppress warning
__INTLIFY_PROD_DEVTOOLS__: false,
__APP_INFO__: JSON.stringify(__APP_INFO__),
+ __COLOR_PLUGIN_OUTPUT_FILE_NAME__: undefined,
+ __PROD__: true,
+ __COLOR_PLUGIN_OPTIONS__: {},
},
css: {