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
fa3a70ad
Unverified
Commit
fa3a70ad
authored
Dec 17, 2022
by
wellCh4n
Committed by
GitHub
Dec 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix][admin] Fix cluster configuration form cannot input. (#1449)
parent
7fa6cac8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
ClusterForm.tsx
...onCenter/ClusterManage/Cluster/components/ClusterForm.tsx
+7
-2
ClusterConfigurationForm.tsx
...sterConfiguration/components/ClusterConfigurationForm.tsx
+7
-3
No files found.
dlink-web/src/pages/RegistrationCenter/ClusterManage/Cluster/components/ClusterForm.tsx
View file @
fa3a70ad
...
...
@@ -69,6 +69,11 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
handleSubmit
(
fieldsValue
);
};
const
onModalCancel
=
()
=>
{
handleModalVisible
(
false
);
form
.
resetFields
();
};
const
renderContent
=
(
formValsPara
:
Partial
<
ClusterTableListItem
>
)
=>
{
form
.
resetFields
();
return
(
...
...
@@ -152,7 +157,7 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
const
renderFooter
=
()
=>
{
return
(
<>
<
Button
onClick=
{
()
=>
handleModalVisible
(
false
)
}
>
{
l
(
'button.cancel'
)
}
</
Button
>
<
Button
onClick=
{
()
=>
onModalCancel
(
)
}
>
{
l
(
'button.cancel'
)
}
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
submitForm
()
}
>
{
l
(
'button.finish'
)
}
</
Button
>
...
...
@@ -168,7 +173,7 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
title=
{
formVals
.
id
?
l
(
'pages.rc.cluster.modify'
)
:
l
(
'pages.rc.cluster.create'
)
}
visible=
{
modalVisible
}
footer=
{
renderFooter
()
}
onCancel=
{
()
=>
handleModalVisible
()
}
onCancel=
{
()
=>
onModalCancel
()
}
>
<
Form
{
...
formLayout
}
...
...
dlink-web/src/pages/RegistrationCenter/ClusterManage/ClusterConfiguration/components/ClusterConfigurationForm.tsx
View file @
fa3a70ad
...
...
@@ -76,6 +76,11 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
setFlinkConfigPath
(
all
[
'flinkConfigPath'
]);
};
const
onModalCancel
=
()
=>
{
handleModalVisible
(
false
);
form
.
resetFields
();
};
const
buildConfig
=
(
config
:
Config
[],
formValsPara
:
any
)
=>
{
const
itemList
:
JSX
.
Element
[]
=
[];
config
.
forEach
(
configItem
=>
{
...
...
@@ -289,7 +294,6 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
}
const
renderContent
=
(
formValsPara
:
Partial
<
ClusterConfigurationTableListItem
>
)
=>
{
form
.
resetFields
();
return
(
<>
<
Form
.
Item
...
...
@@ -363,7 +367,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
const
renderFooter
=
()
=>
{
return
(
<>
<
Button
onClick=
{
()
=>
handleModalVisible
(
false
)
}
>
{
l
(
'button.cancel'
)
}
</
Button
>
<
Button
onClick=
{
()
=>
onModalCancel
(
)
}
>
{
l
(
'button.cancel'
)
}
</
Button
>
<
Button
type=
"primary"
htmlType=
"button"
onClick=
{
testForm
}
>
{
l
(
'button.test'
)
}
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
submitForm
()
}
>
{
l
(
'button.finish'
)
}
</
Button
>
</>
...
...
@@ -378,7 +382,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
title=
{
formVals
.
id
?
l
(
'pages.rc.clusterConfig.modify'
)
:
l
(
'pages.rc.clusterConfig.create'
)
}
visible=
{
modalVisible
}
footer=
{
renderFooter
()
}
onCancel=
{
()
=>
handleModalVisible
()
}
onCancel=
{
()
=>
onModalCancel
()
}
>
<
Form
{
...
formLayout
}
...
...
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