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
f56df483
Commit
f56df483
authored
Mar 08, 2022
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
k8s配置优化
parent
c10ec655
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
14 deletions
+33
-14
ClusterForm.tsx
dlink-web/src/pages/Cluster/components/ClusterForm.tsx
+8
-5
UpdateForm.tsx
dlink-web/src/pages/Cluster/components/UpdateForm.tsx
+8
-5
index.tsx
dlink-web/src/pages/Cluster/index.tsx
+15
-4
ClusterConfigurationForm.tsx
...sterConfiguration/components/ClusterConfigurationForm.tsx
+2
-0
No files found.
dlink-web/src/pages/Cluster/components/ClusterForm.tsx
View file @
f56df483
...
@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react';
...
@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react';
import
{
Form
,
Button
,
Input
,
Modal
,
Select
,
Switch
}
from
'antd'
;
import
{
Form
,
Button
,
Input
,
Modal
,
Select
,
Switch
}
from
'antd'
;
import
{
ClusterTableListItem
}
from
"@/pages/Cluster/data"
;
import
{
ClusterTableListItem
}
from
"@/pages/Cluster/data"
;
import
{
RUN_MODE
}
from
"@/components/Studio/conf"
;
export
type
ClusterFormProps
=
{
export
type
ClusterFormProps
=
{
onCancel
:
(
flag
?:
boolean
)
=>
void
;
onCancel
:
(
flag
?:
boolean
)
=>
void
;
...
@@ -62,11 +63,13 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
...
@@ -62,11 +63,13 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
name=
"type"
name=
"type"
label=
"类型"
label=
"类型"
>
>
<
Select
defaultValue=
"yarn-session"
allowClear
>
<
Select
defaultValue=
{
RUN_MODE
.
YARN_SESSION
}
allowClear
>
<
Option
value=
"standalone"
>
Standalone
</
Option
>
<
Option
value=
{
RUN_MODE
.
STANDALONE
}
>
Standalone
</
Option
>
<
Option
value=
"yarn-session"
>
Yarn Session
</
Option
>
<
Option
value=
{
RUN_MODE
.
YARN_SESSION
}
>
Yarn Session
</
Option
>
<
Option
value=
"yarn-per-job"
>
Yarn Per-Job
</
Option
>
<
Option
value=
{
RUN_MODE
.
YARN_PER_JOB
}
>
Yarn Per-Job
</
Option
>
<
Option
value=
"yarn-application"
>
Yarn Application
</
Option
>
<
Option
value=
{
RUN_MODE
.
YARN_SESSION
}
>
Yarn Application
</
Option
>
<
Option
value=
{
RUN_MODE
.
KUBERNETES_SESSION
}
>
Kubernetes Session
</
Option
>
<
Option
value=
{
RUN_MODE
.
KUBERNETES_APPLICATION
}
>
Kubernetes Application
</
Option
>
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
...
...
dlink-web/src/pages/Cluster/components/UpdateForm.tsx
View file @
f56df483
...
@@ -4,6 +4,7 @@ import {Form, Button, Input, Modal, Select} from 'antd';
...
@@ -4,6 +4,7 @@ import {Form, Button, Input, Modal, Select} from 'antd';
import
Switch
from
"antd/es/switch"
;
import
Switch
from
"antd/es/switch"
;
import
TextArea
from
"antd/es/input/TextArea"
;
import
TextArea
from
"antd/es/input/TextArea"
;
import
{
ClusterTableListItem
}
from
"@/pages/Cluster/data"
;
import
{
ClusterTableListItem
}
from
"@/pages/Cluster/data"
;
import
{
RUN_MODE
}
from
"@/components/Studio/conf"
;
export
type
UpdateFormProps
=
{
export
type
UpdateFormProps
=
{
onCancel
:
(
flag
?:
boolean
,
formVals
?:
Partial
<
ClusterTableListItem
>
)
=>
void
;
onCancel
:
(
flag
?:
boolean
,
formVals
?:
Partial
<
ClusterTableListItem
>
)
=>
void
;
...
@@ -63,11 +64,13 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
...
@@ -63,11 +64,13 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
name=
"type"
name=
"type"
label=
"类型"
label=
"类型"
>
>
<
Select
defaultValue=
"yarn-session"
allowClear
>
<
Select
defaultValue=
{
RUN_MODE
.
YARN_SESSION
}
allowClear
>
<
Option
value=
"standalone"
>
Standalone
</
Option
>
<
Option
value=
{
RUN_MODE
.
STANDALONE
}
>
Standalone
</
Option
>
<
Option
value=
"yarn-session"
>
Yarn Session
</
Option
>
<
Option
value=
{
RUN_MODE
.
YARN_SESSION
}
>
Yarn Session
</
Option
>
<
Option
value=
"yarn-per-job"
>
Yarn Per-Job
</
Option
>
<
Option
value=
{
RUN_MODE
.
YARN_PER_JOB
}
>
Yarn Per-Job
</
Option
>
<
Option
value=
"yarn-application"
>
Yarn Application
</
Option
>
<
Option
value=
{
RUN_MODE
.
YARN_SESSION
}
>
Yarn Application
</
Option
>
<
Option
value=
{
RUN_MODE
.
KUBERNETES_SESSION
}
>
Kubernetes Session
</
Option
>
<
Option
value=
{
RUN_MODE
.
KUBERNETES_APPLICATION
}
>
Kubernetes Application
</
Option
>
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
...
...
dlink-web/src/pages/Cluster/index.tsx
View file @
f56df483
...
@@ -18,6 +18,7 @@ import {
...
@@ -18,6 +18,7 @@ import {
updateEnabled
,
getData
updateEnabled
,
getData
}
from
"@/components/Common/crud"
;
}
from
"@/components/Common/crud"
;
import
{
showCluster
,
showSessionCluster
}
from
"@/components/Studio/StudioEvent/DDL"
;
import
{
showCluster
,
showSessionCluster
}
from
"@/components/Studio/StudioEvent/DDL"
;
import
{
RUN_MODE
}
from
"@/components/Studio/conf"
;
const
TextArea
=
Input
.
TextArea
;
const
TextArea
=
Input
.
TextArea
;
const
url
=
'/api/cluster'
;
const
url
=
'/api/cluster'
;
...
@@ -127,19 +128,27 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -127,19 +128,27 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
filters
:
[
filters
:
[
{
{
text
:
'Yarn Session'
,
text
:
'Yarn Session'
,
value
:
'yarn-session'
,
value
:
RUN_MODE
.
YARN_SESSION
,
},
},
{
{
text
:
'Standalone'
,
text
:
'Standalone'
,
value
:
'standalone'
,
value
:
RUN_MODE
.
STANDALONE
,
},
},
{
{
text
:
'Yarn Per-Job'
,
text
:
'Yarn Per-Job'
,
value
:
'yarn-per-job'
,
value
:
RUN_MODE
.
YARN_PER_JOB
,
},
},
{
{
text
:
'Yarn Application'
,
text
:
'Yarn Application'
,
value
:
'yarn-application'
,
value
:
RUN_MODE
.
YARN_APPLICATION
,
},
{
text
:
'Kubernetes Session'
,
value
:
RUN_MODE
.
KUBERNETES_SESSION
,
},
{
text
:
'Kubernetes Application'
,
value
:
RUN_MODE
.
KUBERNETES_APPLICATION
,
},
},
],
],
filterMultiple
:
false
,
filterMultiple
:
false
,
...
@@ -148,6 +157,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -148,6 +157,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
'standalone'
:
{
text
:
'Standalone'
},
'standalone'
:
{
text
:
'Standalone'
},
'yarn-per-job'
:
{
text
:
'Yarn Per-Job'
},
'yarn-per-job'
:
{
text
:
'Yarn Per-Job'
},
'yarn-application'
:
{
text
:
'Yarn Application'
},
'yarn-application'
:
{
text
:
'Yarn Application'
},
'kubernetes-session'
:
{
text
:
'Kubernetes Session'
},
'kubernetes-application'
:
{
text
:
'Kubernetes Application'
},
},
},
},
},
{
{
...
...
dlink-web/src/pages/ClusterConfiguration/components/ClusterConfigurationForm.tsx
View file @
f56df483
...
@@ -168,6 +168,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
...
@@ -168,6 +168,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
</
Form
.
Item
>
</
Form
.
Item
>
</>:
undefined
}
</>:
undefined
}
<
Divider
>
Flink 配置
</
Divider
>
<
Divider
>
Flink 配置
</
Divider
>
{
formValsPara
.
type
==
'Yarn'
?<>
<
Form
.
Item
<
Form
.
Item
name=
"flinkLibPath"
name=
"flinkLibPath"
label=
"lib 路径"
label=
"lib 路径"
...
@@ -176,6 +177,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
...
@@ -176,6 +177,7 @@ const ClusterConfigurationForm: React.FC<ClusterConfigurationFormProps> = (props
>
>
<
Input
placeholder=
"值如 hdfs:///flink/lib"
/>
<
Input
placeholder=
"值如 hdfs:///flink/lib"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</>:
undefined
}
<
Form
.
Item
<
Form
.
Item
name=
"flinkConfigPath"
name=
"flinkConfigPath"
label=
"配置文件路径"
label=
"配置文件路径"
...
...
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