Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
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
zhaowei
dlink
Commits
2861e551
Commit
2861e551
authored
Nov 27, 2021
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集群配置测试优化
parent
3072dc0e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
YarnGateway.java
...way/src/main/java/com/dlink/gateway/yarn/YarnGateway.java
+4
-0
ClusterConfigurationForm.tsx
...sterConfiguration/components/ClusterConfigurationForm.tsx
+14
-6
No files found.
dlink-gateway/src/main/java/com/dlink/gateway/yarn/YarnGateway.java
View file @
2861e551
...
...
@@ -218,16 +218,20 @@ public abstract class YarnGateway extends AbstractGateway {
try
{
initConfig
();
}
catch
(
Exception
e
){
logger
.
error
(
"测试 Flink 配置失败:"
+
e
.
getMessage
());
return
TestResult
.
fail
(
"测试 Flink 配置失败:"
+
e
.
getMessage
());
}
try
{
initYarnClient
();
if
(
yarnClient
.
isInState
(
Service
.
STATE
.
STARTED
)){
logger
.
info
(
"配置连接测试成功"
);
return
TestResult
.
success
();
}
else
{
logger
.
error
(
"该配置无对应 Yarn 集群存在"
);
return
TestResult
.
fail
(
"该配置无对应 Yarn 集群存在"
);
}
}
catch
(
Exception
e
){
logger
.
error
(
"测试 Yarn 配置失败:"
+
e
.
getMessage
());
return
TestResult
.
fail
(
"测试 Yarn 配置失败:"
+
e
.
getMessage
());
}
}
...
...
dlink-web/src/pages/ClusterConfiguration/components/ClusterConfigurationForm.tsx
View file @
2861e551
...
...
@@ -63,8 +63,8 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
enabled
:
fieldsValue
.
enabled
,
configJson
:
JSON
.
stringify
(
getConfig
(
fieldsValue
)),
};
setFormVals
(
{...
formVals
,
...
formValues
}
);
handleSubmit
(
{...
formVals
,
...
formValues
}
);
setFormVals
(
formValues
);
handleSubmit
(
formValues
);
};
const
renderContent
=
(
formVals
)
=>
{
...
...
@@ -204,10 +204,18 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
);
};
const
testForm
=
()
=>
{
const
fieldsValue
=
form
.
validateFields
();
setFormVals
({...
formVals
,
...
fieldsValue
});
testClusterConfigurationConnect
(
formVals
);
const
testForm
=
async
()
=>
{
const
fieldsValue
=
await
form
.
validateFields
();
let
formValues
=
{
name
:
fieldsValue
.
name
,
alias
:
fieldsValue
.
alias
,
type
:
fieldsValue
.
type
,
note
:
fieldsValue
.
note
,
enabled
:
fieldsValue
.
enabled
,
configJson
:
JSON
.
stringify
(
getConfig
(
fieldsValue
)),
};
setFormVals
(
formValues
);
testClusterConfigurationConnect
(
formValues
);
};
const
renderFooter
=
()
=>
{
...
...
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