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
ea4599d3
Unverified
Commit
ea4599d3
authored
Apr 10, 2024
by
Zzm0809
Committed by
GitHub
Apr 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization] optimize display cluster configuration types (#3367)
Signed-off-by:
Zzm0809
<
934230207@qq.com
>
Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
f15428e6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
18 deletions
+42
-18
function.tsx
...rc/pages/DataStudio/RightContainer/JobConfig/function.tsx
+2
-1
index.tsx
...ster/Configuration/components/ConfigurationList/index.tsx
+1
-1
index.tsx
...ConfigurationModal/ConfigurationForm/BaseConfig/index.tsx
+4
-5
contants.tsx
...s/RegCenter/Cluster/Configuration/components/contants.tsx
+1
-1
index.tsx
...Center/Cluster/Instance/components/InstanceList/index.tsx
+1
-1
constants.tsx
dinky-web/src/pages/RegCenter/Cluster/constants.tsx
+33
-9
No files found.
dinky-web/src/pages/DataStudio/RightContainer/JobConfig/function.tsx
View file @
ea4599d3
...
@@ -47,7 +47,8 @@ export const buildRunModelOptions = () => {
...
@@ -47,7 +47,8 @@ export const buildRunModelOptions = () => {
value
:
RUN_MODE
.
YARN_SESSION
value
:
RUN_MODE
.
YARN_SESSION
},
},
{
{
label
:
'Yarn Per-Job'
,
// flink弃用了 yarn per-job 模式 在这写个标签 带横线的 | flink deprecated yarn per-job mode, write a label here with a horizontal line
label
:
<
del
>
Yarn Per-Job (Deprecated)
</
del
>,
value
:
RUN_MODE
.
YARN_PER_JOB
value
:
RUN_MODE
.
YARN_PER_JOB
},
},
{
{
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx
View file @
ea4599d3
...
@@ -237,7 +237,7 @@ export default () => {
...
@@ -237,7 +237,7 @@ export default () => {
disabled=
{
!
HasAuthority
(
PermissionConstants
.
REGISTRATION_CLUSTER_CONFIG_EDIT
)
}
disabled=
{
!
HasAuthority
(
PermissionConstants
.
REGISTRATION_CLUSTER_CONFIG_EDIT
)
}
/>
/>
<
Tag
color=
'cyan'
>
<
Tag
color=
'cyan'
>
{
CLUSTER_TYPE_OPTIONS
.
find
((
record
)
=>
item
.
type
===
record
.
value
)?.
label
}
{
CLUSTER_TYPE_OPTIONS
(
true
)
.
find
((
record
)
=>
item
.
type
===
record
.
value
)?.
label
}
</
Tag
>
</
Tag
>
<
Tag
<
Tag
icon=
{
item
.
isAvailable
?
<
CheckCircleOutlined
/>
:
<
ExclamationCircleOutlined
/>
}
icon=
{
item
.
isAvailable
?
<
CheckCircleOutlined
/>
:
<
ExclamationCircleOutlined
/>
}
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/ConfigurationForm/BaseConfig/index.tsx
View file @
ea4599d3
...
@@ -38,11 +38,10 @@ const BaseConfig: React.FC = () => {
...
@@ -38,11 +38,10 @@ const BaseConfig: React.FC = () => {
name=
'type'
name=
'type'
label=
{
l
(
'rc.cc.type'
)
}
label=
{
l
(
'rc.cc.type'
)
}
width=
'md'
width=
'md'
options=
{
CLUSTER_CONFIG_TYPE
([
options=
{
CLUSTER_CONFIG_TYPE
(
ClusterType
.
KUBERNETES_OPERATOR
,
[
ClusterType
.
KUBERNETES_OPERATOR
,
ClusterType
.
KUBERNETES_APPLICATION
,
ClusterType
.
YARN
],
ClusterType
.
KUBERNETES_APPLICATION
,
true
ClusterType
.
YARN
)
}
])
}
rules=
{
[{
required
:
true
,
message
:
l
(
'rc.cc.typePlaceholder'
)
}]
}
rules=
{
[{
required
:
true
,
message
:
l
(
'rc.cc.typePlaceholder'
)
}]
}
placeholder=
{
l
(
'rc.cc.typePlaceholder'
)
}
placeholder=
{
l
(
'rc.cc.typePlaceholder'
)
}
/>
/>
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/contants.tsx
View file @
ea4599d3
...
@@ -68,7 +68,7 @@ export const KUBERNETES_CONFIG_LIST: FormConfig[] = [
...
@@ -68,7 +68,7 @@ export const KUBERNETES_CONFIG_LIST: FormConfig[] = [
rules
:
[{
required
:
true
}]
rules
:
[{
required
:
true
}]
},
},
{
{
name
:
'kubernetes.service
.
account'
,
name
:
'kubernetes.service
-
account'
,
label
:
l
(
'rc.cc.k8s.account'
),
label
:
l
(
'rc.cc.k8s.account'
),
placeholder
:
l
(
'rc.cc.k8s.accountHelp'
),
placeholder
:
l
(
'rc.cc.k8s.accountHelp'
),
tooltip
:
l
(
'rc.cc.k8s.accountHelp'
),
tooltip
:
l
(
'rc.cc.k8s.accountHelp'
),
...
...
dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceList/index.tsx
View file @
ea4599d3
...
@@ -237,7 +237,7 @@ export default () => {
...
@@ -237,7 +237,7 @@ export default () => {
disabled=
{
!
HasAuthority
(
PermissionConstants
.
REGISTRATION_CLUSTER_INSTANCE_EDIT
)
}
disabled=
{
!
HasAuthority
(
PermissionConstants
.
REGISTRATION_CLUSTER_INSTANCE_EDIT
)
}
/>
/>
<
Tag
color=
'cyan'
>
<
Tag
color=
'cyan'
>
{
CLUSTER_TYPE_OPTIONS
.
find
((
record
)
=>
item
.
type
===
record
.
value
)?.
label
}
{
CLUSTER_TYPE_OPTIONS
()
.
find
((
record
)
=>
item
.
type
===
record
.
value
)?.
label
}
</
Tag
>
</
Tag
>
<
Tag
<
Tag
icon=
{
item
.
status
===
1
?
<
CheckCircleOutlined
/>
:
<
ExclamationCircleOutlined
/>
}
icon=
{
item
.
status
===
1
?
<
CheckCircleOutlined
/>
:
<
ExclamationCircleOutlined
/>
}
...
...
dinky-web/src/pages/RegCenter/Cluster/constants.ts
→
dinky-web/src/pages/RegCenter/Cluster/constants.ts
x
View file @
ea4599d3
...
@@ -30,7 +30,13 @@ export enum ClusterType {
...
@@ -30,7 +30,13 @@ export enum ClusterType {
LOCAL
=
'local'
LOCAL
=
'local'
}
}
export
const
CLUSTER_TYPE_OPTIONS
:
DefaultOptionType
[]
=
[
/**
* Cluster type options
* @constructor
* @param isClusterConfig
*/
export
const
CLUSTER_TYPE_OPTIONS
=
(
isClusterConfig
:
boolean
=
false
):
DefaultOptionType
[]
=>
[
{
{
value
:
ClusterType
.
STANDALONE
,
value
:
ClusterType
.
STANDALONE
,
label
:
'Standalone'
,
label
:
'Standalone'
,
...
@@ -56,11 +62,21 @@ export const CLUSTER_TYPE_OPTIONS: DefaultOptionType[] = [
...
@@ -56,11 +62,21 @@ export const CLUSTER_TYPE_OPTIONS: DefaultOptionType[] = [
label
:
'Kubernetes Operator'
,
label
:
'Kubernetes Operator'
,
key
:
ClusterType
.
KUBERNETES_OPERATOR
key
:
ClusterType
.
KUBERNETES_OPERATOR
},
},
{
isClusterConfig
value
:
ClusterType
.
YARN_APPLICATION
,
?
{
label
:
'Yarn Application'
,
value
:
ClusterType
.
YARN
,
key
:
ClusterType
.
YARN_APPLICATION
label
:
(
},
<
span
>
Yarn (
<
del
>
Pre-Job
</
del
>
/Application)
</
span
>
),
key
:
ClusterType
.
YARN
}
:
{
value
:
ClusterType
.
YARN_APPLICATION
,
label
:
'Yarn Application'
,
key
:
ClusterType
.
YARN_APPLICATION
},
{
{
value
:
ClusterType
.
LOCAL
,
value
:
ClusterType
.
LOCAL
,
label
:
'Local'
,
label
:
'Local'
,
...
@@ -72,14 +88,22 @@ export const CLUSTER_TYPE_OPTIONS: DefaultOptionType[] = [
...
@@ -72,14 +88,22 @@ export const CLUSTER_TYPE_OPTIONS: DefaultOptionType[] = [
* Cluster instance type
* Cluster instance type
*/
*/
export
const
CLUSTER_INSTANCE_TYPE
=
(
hiddenOptions
:
string
[]
=
[]):
DefaultOptionType
[]
=>
{
export
const
CLUSTER_INSTANCE_TYPE
=
(
hiddenOptions
:
string
[]
=
[]):
DefaultOptionType
[]
=>
{
return
CLUSTER_TYPE_OPTIONS
.
filter
((
item
)
=>
!
hiddenOptions
.
includes
(
item
.
value
as
string
));
return
CLUSTER_TYPE_OPTIONS
(
false
).
filter
(
(
item
)
=>
!
hiddenOptions
.
includes
(
item
.
value
as
string
)
);
};
};
/**
/**
* Cluster config type
* Cluster config type
* @param renderOptions
* @param renderOptions
* @param isClusterConfig
* @constructor
* @constructor
*/
*/
export
const
CLUSTER_CONFIG_TYPE
=
(
renderOptions
:
string
[]
=
[]):
DefaultOptionType
[]
=>
{
export
const
CLUSTER_CONFIG_TYPE
=
(
return
CLUSTER_TYPE_OPTIONS
.
filter
((
item
)
=>
renderOptions
.
includes
(
item
.
value
as
string
));
renderOptions
:
string
[]
=
[],
isClusterConfig
:
boolean
=
false
):
DefaultOptionType
[]
=>
{
return
CLUSTER_TYPE_OPTIONS
(
isClusterConfig
).
filter
((
item
)
=>
renderOptions
.
includes
(
item
.
value
as
string
)
);
};
};
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