diff --git a/dinky-web/src/locales/en-US/global.ts b/dinky-web/src/locales/en-US/global.ts index b559e97f6d..34857d713a 100644 --- a/dinky-web/src/locales/en-US/global.ts +++ b/dinky-web/src/locales/en-US/global.ts @@ -63,6 +63,7 @@ export default { 'button.collapse-all': 'Collapse All', 'button.position': 'Position', 'button.test': 'Test', + 'button.test.connection': 'Test Connection', 'button.clear': 'Clear', 'button.copy': 'Copy', 'button.refreshData': 'Refresh Data', diff --git a/dinky-web/src/locales/zh-CN/global.ts b/dinky-web/src/locales/zh-CN/global.ts index c168021a5d..6320f14642 100644 --- a/dinky-web/src/locales/zh-CN/global.ts +++ b/dinky-web/src/locales/zh-CN/global.ts @@ -63,6 +63,7 @@ export default { 'button.collapse-all': '全部折叠', 'button.position': '定位', 'button.test': '测试', + 'button.test.connection': '测试连接', 'button.clear': '清除', 'button.copy': '复制', 'button.refreshData': '刷新数据', diff --git a/dinky-web/src/pages/DataStudio/LeftContainer/Project/index.tsx b/dinky-web/src/pages/DataStudio/LeftContainer/Project/index.tsx index 8592a524b6..75b76d6bf4 100644 --- a/dinky-web/src/pages/DataStudio/LeftContainer/Project/index.tsx +++ b/dinky-web/src/pages/DataStudio/LeftContainer/Project/index.tsx @@ -143,10 +143,7 @@ const Project: React.FC = (props: connect) => { payload: getRightSelectKeyFromNodeClickJobType(type) }); const bottomKey = getBottomSelectKeyFromNodeClickJobType(type); - dispatch({ - type: STUDIO_MODEL.updateSelectBottomKey, - payload: bottomKey - }); + if (bottomKey === LeftBottomKey.TOOLS_KEY) { dispatch({ type: STUDIO_MODEL.updateSelectBottomSubKey, diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx index 7d5efeadf9..f5b7254288 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx @@ -136,12 +136,6 @@ const MiddleContainer = (props: any) => { payload: getRightSelectKeyFromNodeClickJobType(subType ?? '') }); - // 根据 作业类型渲染 左下角选中菜单 key - dispatch({ - type: STUDIO_MODEL.updateSelectBottomKey, - payload: getBottomSelectKeyFromNodeClickJobType(subType ?? '') - }); - // 这里如果加此项功能和定位功能重复 , 暂时注释 // if (item.type === TabsPageType.project) { // 更新左侧树选中的 key diff --git a/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx b/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx index 7debfcd7e9..41dc2471cd 100644 --- a/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx +++ b/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx @@ -303,6 +303,7 @@ export default () => { onClose={handleCancel} value={{}} onSubmit={handleSubmit} + onHeartBeat={handleCheckHeartBeat} /> {/*modify*/} {clusterConfigState.editOpen && ( @@ -311,6 +312,7 @@ export default () => { onClose={handleCancel} value={clusterConfigState.value} onSubmit={handleSubmit} + onHeartBeat={handleCheckHeartBeat} /> )} diff --git a/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/index.tsx b/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/index.tsx index bf38baab98..5769c5ebb7 100644 --- a/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/index.tsx +++ b/dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/index.tsx @@ -17,6 +17,7 @@ * */ +import { LoadingBtn } from '@/components/CallBackButton/LoadingBtn'; import { FormContextValue } from '@/components/Context/FormContext'; import { STUDIO_MODEL_ASYNC } from '@/pages/DataStudio/model'; import ConfigurationForm from '@/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/ConfigurationForm'; @@ -32,9 +33,10 @@ type ConfigurationModalProps = { onClose: () => void; value: Partial; onSubmit: (values: Partial) => void; + onHeartBeat: (values: Partial) => void; }; const ConfigurationModal: React.FC = (props) => { - const { visible, onClose, onSubmit, value, dispatch } = props; + const { visible, onClose, onSubmit, value, onHeartBeat, dispatch } = props; /** * init form @@ -82,6 +84,14 @@ const ConfigurationModal: React.FC = (props) handleCancel(); }; + /** + * handle test connect + * */ + const handleTestConnect = async () => { + const fieldsValue = await form.validateFields(); + await onHeartBeat(fieldsValue); + }; + /** * render footer * @returns {[JSX.Element, JSX.Element]} @@ -91,6 +101,16 @@ const ConfigurationModal: React.FC = (props) , + , ]; }; diff --git a/dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceModal/index.tsx b/dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceModal/index.tsx index 1cd14c9186..307d4b202d 100644 --- a/dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceModal/index.tsx +++ b/dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceModal/index.tsx @@ -93,7 +93,7 @@ const InstanceModal: React.FC = (props) => { autoFocus onClick={() => submitForm()} > - {l('button.finish')} + {l('button.save')} ]; };