Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
a2546328
Unverified
Commit
a2546328
authored
Feb 01, 2024
by
gaoyan
Committed by
GitHub
Feb 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization]Cluster config restore Test Connection (#3123)
Co-authored-by:
gaoyan1998
<
gaoyan1998@users.noreply.github.com
>
parent
6e36d765
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
13 deletions
+28
-13
global.ts
dinky-web/src/locales/en-US/global.ts
+1
-0
global.ts
dinky-web/src/locales/zh-CN/global.ts
+1
-0
index.tsx
...-web/src/pages/DataStudio/LeftContainer/Project/index.tsx
+1
-4
index.tsx
dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx
+0
-6
index.tsx
...ster/Configuration/components/ConfigurationList/index.tsx
+2
-0
index.tsx
...ter/Configuration/components/ConfigurationModal/index.tsx
+22
-2
index.tsx
...enter/Cluster/Instance/components/InstanceModal/index.tsx
+1
-1
No files found.
dinky-web/src/locales/en-US/global.ts
View file @
a2546328
...
@@ -63,6 +63,7 @@ export default {
...
@@ -63,6 +63,7 @@ export default {
'button.collapse-all'
:
'Collapse All'
,
'button.collapse-all'
:
'Collapse All'
,
'button.position'
:
'Position'
,
'button.position'
:
'Position'
,
'button.test'
:
'Test'
,
'button.test'
:
'Test'
,
'button.test.connection'
:
'Test Connection'
,
'button.clear'
:
'Clear'
,
'button.clear'
:
'Clear'
,
'button.copy'
:
'Copy'
,
'button.copy'
:
'Copy'
,
'button.refreshData'
:
'Refresh Data'
,
'button.refreshData'
:
'Refresh Data'
,
...
...
dinky-web/src/locales/zh-CN/global.ts
View file @
a2546328
...
@@ -63,6 +63,7 @@ export default {
...
@@ -63,6 +63,7 @@ export default {
'button.collapse-all'
:
'全部折叠'
,
'button.collapse-all'
:
'全部折叠'
,
'button.position'
:
'定位'
,
'button.position'
:
'定位'
,
'button.test'
:
'测试'
,
'button.test'
:
'测试'
,
'button.test.connection'
:
'测试连接'
,
'button.clear'
:
'清除'
,
'button.clear'
:
'清除'
,
'button.copy'
:
'复制'
,
'button.copy'
:
'复制'
,
'button.refreshData'
:
'刷新数据'
,
'button.refreshData'
:
'刷新数据'
,
...
...
dinky-web/src/pages/DataStudio/LeftContainer/Project/index.tsx
View file @
a2546328
...
@@ -143,10 +143,7 @@ const Project: React.FC = (props: connect) => {
...
@@ -143,10 +143,7 @@ const Project: React.FC = (props: connect) => {
payload
:
getRightSelectKeyFromNodeClickJobType
(
type
)
payload
:
getRightSelectKeyFromNodeClickJobType
(
type
)
});
});
const
bottomKey
=
getBottomSelectKeyFromNodeClickJobType
(
type
);
const
bottomKey
=
getBottomSelectKeyFromNodeClickJobType
(
type
);
dispatch
({
type
:
STUDIO_MODEL
.
updateSelectBottomKey
,
payload
:
bottomKey
});
if
(
bottomKey
===
LeftBottomKey
.
TOOLS_KEY
)
{
if
(
bottomKey
===
LeftBottomKey
.
TOOLS_KEY
)
{
dispatch
({
dispatch
({
type
:
STUDIO_MODEL
.
updateSelectBottomSubKey
,
type
:
STUDIO_MODEL
.
updateSelectBottomSubKey
,
...
...
dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx
View file @
a2546328
...
@@ -136,12 +136,6 @@ const MiddleContainer = (props: any) => {
...
@@ -136,12 +136,6 @@ const MiddleContainer = (props: any) => {
payload
:
getRightSelectKeyFromNodeClickJobType
(
subType
??
''
)
payload
:
getRightSelectKeyFromNodeClickJobType
(
subType
??
''
)
});
});
// 根据 作业类型渲染 左下角选中菜单 key
dispatch
({
type
:
STUDIO_MODEL
.
updateSelectBottomKey
,
payload
:
getBottomSelectKeyFromNodeClickJobType
(
subType
??
''
)
});
// 这里如果加此项功能和定位功能重复 , 暂时注释
// 这里如果加此项功能和定位功能重复 , 暂时注释
// if (item.type === TabsPageType.project) {
// if (item.type === TabsPageType.project) {
// 更新左侧树选中的 key
// 更新左侧树选中的 key
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx
View file @
a2546328
...
@@ -303,6 +303,7 @@ export default () => {
...
@@ -303,6 +303,7 @@ export default () => {
onClose=
{
handleCancel
}
onClose=
{
handleCancel
}
value=
{
{}
}
value=
{
{}
}
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
onHeartBeat=
{
handleCheckHeartBeat
}
/>
/>
{
/*modify*/
}
{
/*modify*/
}
{
clusterConfigState
.
editOpen
&&
(
{
clusterConfigState
.
editOpen
&&
(
...
@@ -311,6 +312,7 @@ export default () => {
...
@@ -311,6 +312,7 @@ export default () => {
onClose=
{
handleCancel
}
onClose=
{
handleCancel
}
value=
{
clusterConfigState
.
value
}
value=
{
clusterConfigState
.
value
}
onSubmit=
{
handleSubmit
}
onSubmit=
{
handleSubmit
}
onHeartBeat=
{
handleCheckHeartBeat
}
/>
/>
)
}
)
}
</>
</>
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/index.tsx
View file @
a2546328
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
*
*
*/
*/
import
{
LoadingBtn
}
from
'@/components/CallBackButton/LoadingBtn'
;
import
{
FormContextValue
}
from
'@/components/Context/FormContext'
;
import
{
FormContextValue
}
from
'@/components/Context/FormContext'
;
import
{
STUDIO_MODEL_ASYNC
}
from
'@/pages/DataStudio/model'
;
import
{
STUDIO_MODEL_ASYNC
}
from
'@/pages/DataStudio/model'
;
import
ConfigurationForm
from
'@/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/ConfigurationForm'
;
import
ConfigurationForm
from
'@/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/ConfigurationForm'
;
...
@@ -32,9 +33,10 @@ type ConfigurationModalProps = {
...
@@ -32,9 +33,10 @@ type ConfigurationModalProps = {
onClose
:
()
=>
void
;
onClose
:
()
=>
void
;
value
:
Partial
<
Cluster
.
Config
>
;
value
:
Partial
<
Cluster
.
Config
>
;
onSubmit
:
(
values
:
Partial
<
Cluster
.
Config
>
)
=>
void
;
onSubmit
:
(
values
:
Partial
<
Cluster
.
Config
>
)
=>
void
;
onHeartBeat
:
(
values
:
Partial
<
Cluster
.
Config
>
)
=>
void
;
};
};
const
ConfigurationModal
:
React
.
FC
<
ConfigurationModalProps
&
connect
>
=
(
props
)
=>
{
const
ConfigurationModal
:
React
.
FC
<
ConfigurationModalProps
&
connect
>
=
(
props
)
=>
{
const
{
visible
,
onClose
,
onSubmit
,
value
,
dispatch
}
=
props
;
const
{
visible
,
onClose
,
onSubmit
,
value
,
onHeartBeat
,
dispatch
}
=
props
;
/**
/**
* init form
* init form
...
@@ -82,6 +84,14 @@ const ConfigurationModal: React.FC<ConfigurationModalProps & connect> = (props)
...
@@ -82,6 +84,14 @@ const ConfigurationModal: React.FC<ConfigurationModalProps & connect> = (props)
handleCancel
();
handleCancel
();
};
};
/**
* handle test connect
* */
const
handleTestConnect
=
async
()
=>
{
const
fieldsValue
=
await
form
.
validateFields
();
await
onHeartBeat
(
fieldsValue
);
};
/**
/**
* render footer
* render footer
* @returns {[JSX.Element, JSX.Element]}
* @returns {[JSX.Element, JSX.Element]}
...
@@ -91,6 +101,16 @@ const ConfigurationModal: React.FC<ConfigurationModalProps & connect> = (props)
...
@@ -91,6 +101,16 @@ const ConfigurationModal: React.FC<ConfigurationModalProps & connect> = (props)
<
Button
key=
{
'cancel'
}
onClick=
{
()
=>
handleCancel
()
}
>
<
Button
key=
{
'cancel'
}
onClick=
{
()
=>
handleCancel
()
}
>
{
l
(
'button.cancel'
)
}
{
l
(
'button.cancel'
)
}
</
Button
>,
</
Button
>,
<
LoadingBtn
key=
{
'test'
}
props=
{
{
size
:
'middle'
,
type
:
'primary'
,
style
:
{
background
:
'#52c41a'
}
}
}
click=
{
handleTestConnect
}
title=
{
l
(
'button.test.connection'
)
}
/>,
<
Button
<
Button
key=
{
'finish'
}
key=
{
'finish'
}
loading=
{
submitting
}
loading=
{
submitting
}
...
@@ -99,7 +119,7 @@ const ConfigurationModal: React.FC<ConfigurationModalProps & connect> = (props)
...
@@ -99,7 +119,7 @@ const ConfigurationModal: React.FC<ConfigurationModalProps & connect> = (props)
autoFocus
autoFocus
onClick=
{
()
=>
submitForm
()
}
onClick=
{
()
=>
submitForm
()
}
>
>
{
l
(
'button.
finish
'
)
}
{
l
(
'button.
save
'
)
}
</
Button
>
</
Button
>
];
];
};
};
...
...
dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceModal/index.tsx
View file @
a2546328
...
@@ -93,7 +93,7 @@ const InstanceModal: React.FC<InstanceModalProps> = (props) => {
...
@@ -93,7 +93,7 @@ const InstanceModal: React.FC<InstanceModalProps> = (props) => {
autoFocus
autoFocus
onClick=
{
()
=>
submitForm
()
}
onClick=
{
()
=>
submitForm
()
}
>
>
{
l
(
'button.
finish
'
)
}
{
l
(
'button.
save
'
)
}
</
Button
>
</
Button
>
];
];
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment