Unverified Commit 48f7e9cb authored by Zzm0809's avatar Zzm0809 Committed by GitHub

Optimize the prompt properties of the front-end dropdown menu and upgrade the…

Optimize the prompt properties of the front-end dropdown menu and upgrade the front-end dependency version (#3524) Signed-off-by: 's avatarZzm0809 <934230207@qq.com>
parent 375df0c7
...@@ -38,49 +38,49 @@ ...@@ -38,49 +38,49 @@
"@andrewray/react-multi-split-pane": "^0.3.5", "@andrewray/react-multi-split-pane": "^0.3.5",
"@ant-design/charts": "^2.1.1", "@ant-design/charts": "^2.1.1",
"@ant-design/icons": "^5.3.7", "@ant-design/icons": "^5.3.7",
"@ant-design/pro-components": "^2.6.43", "@ant-design/pro-components": "^2.7.9",
"@ant-design/pro-layout": "^7.17.16", "@ant-design/pro-layout": "^7.19.7",
"@ant-design/pro-table": "^3.13.11", "@ant-design/pro-table": "^3.16.0",
"@ant-design/use-emotion-css": "^1.0.4", "@ant-design/use-emotion-css": "^1.0.4",
"@antv/layout": "0.3.25", "@antv/layout": "0.3.25",
"@antv/x6": "^2.15.6", "@antv/x6": "^2.18.1",
"@antv/x6-plugin-selection": "^2.2.1", "@antv/x6-plugin-selection": "^2.2.2",
"@antv/x6-react-shape": "^2.2.2", "@antv/x6-react-shape": "^2.2.3",
"@monaco-editor/react": "^4.6.0", "@monaco-editor/react": "^4.6.0",
"@umijs/route-utils": "^4.0.1", "@umijs/route-utils": "^4.0.1",
"antd": "^5.11.5", "antd": "^5.17.3",
"butterfly-dag": "^4.3.28", "butterfly-dag": "^4.3.28",
"classnames": "^2.3.2", "classnames": "^2.5.1",
"dayjs": "^1.11.10", "dayjs": "^1.11.11",
"jquery": "^3.7.1", "jquery": "^3.7.1",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"million": "^2.6.4", "million": "^3.1.1",
"moment": "^2.29.4", "moment": "^2.30.1",
"monaco-editor": "^0.44.0", "monaco-editor": "^0.48.0",
"omit.js": "^2.0.2", "omit.js": "^2.0.2",
"path-to-regexp": "^6.2.1", "path-to-regexp": "^6.2.2",
"rc-menu": "^9.12.2", "rc-menu": "^9.14.0",
"rc-util": "^5.38.1", "rc-util": "^5.41.0",
"re-resizable": "^6.9.11", "re-resizable": "^6.9.16",
"react": "^18.2.0", "react": "^18.3.1",
"react-countup": "^6.5.0", "react-countup": "^6.5.3",
"react-dom": "^18.0.0", "react-dom": "^18.3.1",
"react-helmet-async": "^2.0.1", "react-helmet-async": "^2.0.5",
"react-lineage-dag": "^2.0.36", "react-lineage-dag": "^2.0.36",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"react-spring": "^9.7.3", "react-spring": "^9.7.3",
"react-use-cookie": "^1.4.0", "react-use-cookie": "^1.6.1",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"remark-gfm": "^4.0.0", "remark-gfm": "^4.0.0",
"screenfull": "^6.0.2", "screenfull": "^6.0.2",
"sql-formatter": "^14.0.0", "sql-formatter": "^15.3.1",
"styled-components": "^6.1.1", "styled-components": "^6.1.1",
"use-sse": "^2.0.1", "use-sse": "^2.0.1",
"uuid": "^9.0.1" "uuid": "^9.0.1"
}, },
"devDependencies": { "devDependencies": {
"@ant-design/pro-cli": "^3.0.1", "@ant-design/pro-cli": "^3.2.1",
"@types/classnames": "^2.3.1", "@types/classnames": "^2.3.1",
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/history": "^5.0.0", "@types/history": "^5.0.0",
...@@ -88,19 +88,19 @@ ...@@ -88,19 +88,19 @@
"@types/react": "^18.2.39", "@types/react": "^18.2.39",
"@types/react-dom": "^18.2.17", "@types/react-dom": "^18.2.17",
"@types/react-helmet": "^6.1.9", "@types/react-helmet": "^6.1.9",
"@umijs/lint": "^4.0.89", "@umijs/lint": "^4.2.5",
"@umijs/max": "^4.0.89", "@umijs/max": "^4.2.5",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.54.0", "eslint": "^9.3.0",
"express": "^4.18.2", "express": "^4.19.2",
"husky": "^8", "husky": "^8",
"lint-staged": "^13", "lint-staged": "^13",
"prettier": "^2", "prettier": "^2",
"react-dev-inspector": "^2.0.0", "react-dev-inspector": "^2.0.1",
"react-inspector": "^6.0.2", "react-inspector": "^6.0.2",
"sql-formatter": "^13.0.1", "sql-formatter": "^13.0.1",
"swagger-ui-dist": "^5.10.3", "swagger-ui-dist": "^5.17.12",
"ts-node": "^10.9.1", "ts-node": "^10.9.2",
"typescript": "^4", "typescript": "^4",
"umi-presets-pro": "^2.0.0" "umi-presets-pro": "^2.0.0"
}, },
......
...@@ -459,7 +459,7 @@ export default { ...@@ -459,7 +459,7 @@ export default {
'pages.datastudio.label.jobConfig.clusterConfig.tip1': 'pages.datastudio.label.jobConfig.clusterConfig.tip1':
'Select Flink cluster Config for remote submission tasks in [{type}] mode', 'Select Flink cluster Config for remote submission tasks in [{type}] mode',
'pages.datastudio.label.jobConfig.clusterConfig.tip2': 'pages.datastudio.label.jobConfig.clusterConfig.tip2':
'If there is no data in the drop-down box, please configure/create a new cluster instance first, or check whether the cluster configuration/cluster instance is healthy and available.', 'If there is no data in the drop-down box, please configure/create a new cluster instance first, or check whether the cluster configuration/cluster instance is healthy and available/Is it in an enabled state',
'pages.datastudio.label.jobConfig.execmode.tip': 'pages.datastudio.label.jobConfig.execmode.tip':
'Specify the execution mode of the Flink task, the default is Local', 'Specify the execution mode of the Flink task, the default is Local',
'pages.datastudio.label.jobConfig.watermark': 'pages.datastudio.label.jobConfig.watermark':
...@@ -472,9 +472,6 @@ export default { ...@@ -472,9 +472,6 @@ export default {
'pages.datastudio.label.jobConfig.fragment': 'Global variables', 'pages.datastudio.label.jobConfig.fragment': 'Global variables',
'pages.datastudio.label.jobConfig.fragment.tip': 'pages.datastudio.label.jobConfig.fragment.tip':
'[Enhanced Features] Enable FlinkSql global variables, use "', '[Enhanced Features] Enable FlinkSql global variables, use "',
'pages.datastudio.label.jobConfig.insert': 'Insert StatementSet',
'pages.datastudio.label.jobConfig.insert.tip':
'[Enhanced Features] Enable the statement set mechanism, multiple Insert statements will be combined into one JobGraph before submission, and the Select statement is invalid',
'pages.datastudio.label.jobConfig.other': 'Other Config', 'pages.datastudio.label.jobConfig.other': 'Other Config',
'pages.datastudio.label.jobConfig.other.tip': 'pages.datastudio.label.jobConfig.other.tip':
'Other Config items will be applied to the execution environment, such as pipeline.name', 'Other Config items will be applied to the execution environment, such as pipeline.name',
......
...@@ -438,7 +438,7 @@ export default { ...@@ -438,7 +438,7 @@ export default {
'pages.datastudio.label.jobConfig.clusterConfig.tip1': 'pages.datastudio.label.jobConfig.clusterConfig.tip1':
'选择Flink集群配置进行【{type}】模式的远程提交任务', '选择Flink集群配置进行【{type}】模式的远程提交任务',
'pages.datastudio.label.jobConfig.clusterConfig.tip2': 'pages.datastudio.label.jobConfig.clusterConfig.tip2':
'如下拉框无数据,请先配置/新建集群实例,或者检查集群配置/集群实例是否为健康可用状态', '如下拉框无数据,请先配置/新建集群实例,或者检查集群配置/集群实例是否为健康可用状态/是否为启用状态',
'pages.datastudio.label.jobConfig.execmode.tip': '指定 Flink 任务的执行模式,默认为 Local', 'pages.datastudio.label.jobConfig.execmode.tip': '指定 Flink 任务的执行模式,默认为 Local',
'pages.datastudio.label.jobConfig.watermark': '当前任务已发布,配置禁止修改,如需修改,请先下线', 'pages.datastudio.label.jobConfig.watermark': '当前任务已发布,配置禁止修改,如需修改,请先下线',
'pages.datastudio.label.jobConfig.lock': 'pages.datastudio.label.jobConfig.lock':
...@@ -447,10 +447,7 @@ export default { ...@@ -447,10 +447,7 @@ export default {
'pages.datastudio.label.jobConfig.flinksql.env.tip1': 'pages.datastudio.label.jobConfig.flinksql.env.tip1':
'选择当前任务的 FlinkSQL 执行环境,会提前执行环境语句,默认无。', '选择当前任务的 FlinkSQL 执行环境,会提前执行环境语句,默认无。',
'pages.datastudio.label.jobConfig.fragment': '全局变量', 'pages.datastudio.label.jobConfig.fragment': '全局变量',
'pages.datastudio.label.jobConfig.fragment.tip': '【增强特性】 开启FlinkSql全局变量,使用“', 'pages.datastudio.label.jobConfig.fragment.tip': '【增强特性】 开启FlinkSql全局变量',
'pages.datastudio.label.jobConfig.insert': 'Insert语句集',
'pages.datastudio.label.jobConfig.insert.tip':
'【增强特性】 开启语句集机制,将把多个 Insert 语句合成一个 JobGraph 再进行提交,Select 语句无效',
'pages.datastudio.label.jobConfig.other': '其他配置', 'pages.datastudio.label.jobConfig.other': '其他配置',
'pages.datastudio.label.jobConfig.other.tip': '其他配置项,将被应用于执行环境,如 pipeline.name', 'pages.datastudio.label.jobConfig.other.tip': '其他配置项,将被应用于执行环境,如 pipeline.name',
'pages.datastudio.label.jobConfig.parallelism': '任务并行度', 'pages.datastudio.label.jobConfig.parallelism': '任务并行度',
......
...@@ -36,36 +36,44 @@ export const buildRunModelOptions = () => { ...@@ -36,36 +36,44 @@ export const buildRunModelOptions = () => {
resultReturn.push( resultReturn.push(
{ {
label: 'Local', label: 'Local',
value: RUN_MODE.LOCAL value: RUN_MODE.LOCAL,
key: RUN_MODE.LOCAL,
}, },
{ {
label: 'Standalone', label: 'Standalone',
value: RUN_MODE.STANDALONE value: RUN_MODE.STANDALONE,
key: RUN_MODE.STANDALONE,
}, },
{ {
label: 'Yarn Session', label: 'Yarn Session',
value: RUN_MODE.YARN_SESSION value: RUN_MODE.YARN_SESSION,
key: RUN_MODE.YARN_SESSION,
}, },
{ {
// flink弃用了 yarn per-job 模式 在这写个标签 带横线的 | flink deprecated yarn per-job mode, write a label here with a horizontal line // flink弃用了 yarn per-job 模式 在这写个标签 带横线的 | flink deprecated yarn per-job mode, write a label here with a horizontal line
label: <del>Yarn Per-Job (Deprecated)</del>, label: <del>Yarn Per-Job (Deprecated)</del>,
value: RUN_MODE.YARN_PER_JOB value: RUN_MODE.YARN_PER_JOB,
key: RUN_MODE.YARN_PER_JOB,
}, },
{ {
label: 'Yarn Application', label: 'Yarn Application',
value: RUN_MODE.YARN_APPLICATION value: RUN_MODE.YARN_APPLICATION,
key: RUN_MODE.YARN_APPLICATION,
}, },
{ {
label: 'Kubernetes Session', label: 'Kubernetes Session',
value: RUN_MODE.KUBERNETES_SESSION value: RUN_MODE.KUBERNETES_SESSION,
key: RUN_MODE.KUBERNETES_SESSION,
}, },
{ {
label: 'Kubernetes Application', label: 'Kubernetes Application',
value: RUN_MODE.KUBERNETES_APPLICATION value: RUN_MODE.KUBERNETES_APPLICATION,
key: RUN_MODE.KUBERNETES_APPLICATION,
}, },
{ {
label: 'Kubernetes Operator Application', label: 'Kubernetes Operator Application',
value: RUN_MODE.KUBERNETES_APPLICATION_OPERATOR value: RUN_MODE.KUBERNETES_APPLICATION_OPERATOR,
key: RUN_MODE.KUBERNETES_APPLICATION_OPERATOR,
} }
); );
...@@ -97,6 +105,7 @@ export const buildClusterOptions = ( ...@@ -97,6 +105,7 @@ export const buildClusterOptions = (
); );
sessionClusterOptions.push({ sessionClusterOptions.push({
label: tag, label: tag,
title: item.name,
value: item.id, value: item.id,
key: item.id key: item.id
}); });
...@@ -136,6 +145,7 @@ export const buildClusterConfigOptions = ( ...@@ -136,6 +145,7 @@ export const buildClusterConfigOptions = (
); );
clusterConfigOptions.push({ clusterConfigOptions.push({
label: tag, label: tag,
title: item.name,
value: item.id, value: item.id,
key: item.id key: item.id
}); });
...@@ -155,6 +165,7 @@ export const buildEnvOptions = (env: TaskInfo[] = []) => { ...@@ -155,6 +165,7 @@ export const buildEnvOptions = (env: TaskInfo[] = []) => {
{l('button.disable')} {l('button.disable')}
</Space> </Space>
), ),
title: l('button.disable'),
value: -1, value: -1,
key: -1 key: -1
} }
...@@ -174,6 +185,7 @@ export const buildEnvOptions = (env: TaskInfo[] = []) => { ...@@ -174,6 +185,7 @@ export const buildEnvOptions = (env: TaskInfo[] = []) => {
envList.push({ envList.push({
label: tag, label: tag,
title: item.name,
value: item.id, value: item.id,
key: item.id, key: item.id,
disabled: !item.enabled disabled: !item.enabled
...@@ -194,6 +206,7 @@ export const buildAlertGroupOptions = (alertGroups: Alert.AlertGroup[] = []) => ...@@ -194,6 +206,7 @@ export const buildAlertGroupOptions = (alertGroups: Alert.AlertGroup[] = []) =>
{l('button.disable')} {l('button.disable')}
</TagAlignLeft> </TagAlignLeft>
), ),
title: l('button.disable'),
value: -1, value: -1,
key: -1 key: -1
} }
...@@ -207,6 +220,7 @@ export const buildAlertGroupOptions = (alertGroups: Alert.AlertGroup[] = []) => ...@@ -207,6 +220,7 @@ export const buildAlertGroupOptions = (alertGroups: Alert.AlertGroup[] = []) =>
</TagAlignLeft> </TagAlignLeft>
), ),
value: item.id, value: item.id,
title: item.name,
key: item.id key: item.id
}); });
}); });
......
...@@ -75,7 +75,7 @@ const JobConfig = (props: any) => { ...@@ -75,7 +75,7 @@ const JobConfig = (props: any) => {
const [form] = useForm(); const [form] = useForm();
const [selectRunMode, setSelectRunMode] = useState<string>(current?.type); const [selectRunMode, setSelectRunMode] = useState<string>(current?.type ?? RUN_MODE.LOCAL);
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
...@@ -93,7 +93,7 @@ const JobConfig = (props: any) => { ...@@ -93,7 +93,7 @@ const JobConfig = (props: any) => {
dispatch({ dispatch({
type: ALERT_MODEL_ASYNC.queryAlertGroup type: ALERT_MODEL_ASYNC.queryAlertGroup
}); });
setSelectRunMode(current?.type); setSelectRunMode(current?.type ?? RUN_MODE.LOCAL);
form.setFieldsValue({ ...current, type: current?.type }); form.setFieldsValue({ ...current, type: current?.type });
}, [current]); }, [current]);
...@@ -181,7 +181,7 @@ const JobConfig = (props: any) => { ...@@ -181,7 +181,7 @@ const JobConfig = (props: any) => {
type: current?.type type: current?.type
})} })}
label={l('pages.datastudio.label.jobConfig.cluster')} label={l('pages.datastudio.label.jobConfig.cluster')}
tooltip={l('pages.datastudio.label.jobConfig.clusterConfig.tip1', '', { tooltip={l('pages.datastudio.label.jobConfig.clusterConfig.tip2', '', {
type: current?.type type: current?.type
})} })}
rules={[ rules={[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment