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
73c044aa
Unverified
Commit
73c044aa
authored
Oct 30, 2022
by
aiwenmo
Committed by
GitHub
Oct 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization-1180][web] Optimizate task delete and cluster manager (#1181)
Co-authored-by:
wenmo
<
32723967+wenmo@users.noreply.github.com
>
parent
70c4d1f1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
22 deletions
+24
-22
global.ts
dlink-web/src/locales/en-US/global.ts
+1
-1
menu.ts
dlink-web/src/locales/en-US/menu.ts
+1
-1
global.ts
dlink-web/src/locales/zh-CN/global.ts
+2
-2
menu.ts
dlink-web/src/locales/zh-CN/menu.ts
+1
-1
index.tsx
dlink-web/src/pages/Cluster/index.tsx
+15
-15
model.ts
dlink-web/src/pages/DataStudio/model.ts
+4
-2
No files found.
dlink-web/src/locales/en-US/global.ts
View file @
73c044aa
...
@@ -111,7 +111,7 @@ export default {
...
@@ -111,7 +111,7 @@ export default {
'global.table.nickName'
:
'Nick Name'
,
'global.table.nickName'
:
'Nick Name'
,
'global.table.instanceName'
:
'Instance Name'
,
'global.table.instanceName'
:
'Instance Name'
,
'global.table.instanceId'
:
'Instance Id'
,
'global.table.instanceId'
:
'Instance Id'
,
'global.table.clusterManagement'
:
'
Cluster
Management'
,
'global.table.clusterManagement'
:
'
Flink Instance
Management'
,
'global.table.create'
:
'Create'
,
'global.table.create'
:
'Create'
,
'global.table.heartbeat'
:
'Heartbeat'
,
'global.table.heartbeat'
:
'Heartbeat'
,
'global.table.recycle'
:
'Recycle'
,
'global.table.recycle'
:
'Recycle'
,
...
...
dlink-web/src/locales/en-US/menu.ts
View file @
73c044aa
...
@@ -37,7 +37,7 @@ export default {
...
@@ -37,7 +37,7 @@ export default {
'menu.registration'
:
'Registration Center'
,
'menu.registration'
:
'Registration Center'
,
'menu.registration.cluster'
:
'Cluster Management'
,
'menu.registration.cluster'
:
'Cluster Management'
,
'menu.registration.cluster.clusterInstance'
:
'
Cluster
Instance'
,
'menu.registration.cluster.clusterInstance'
:
'
Flink
Instance'
,
'menu.registration.cluster.clusterConfiguration'
:
'Cluster Config'
,
'menu.registration.cluster.clusterConfiguration'
:
'Cluster Config'
,
'menu.registration.jar'
:
'Jar Management'
,
'menu.registration.jar'
:
'Jar Management'
,
'menu.registration.database'
:
'Data Source Management'
,
'menu.registration.database'
:
'Data Source Management'
,
...
...
dlink-web/src/locales/zh-CN/global.ts
View file @
73c044aa
...
@@ -110,9 +110,9 @@ export default {
...
@@ -110,9 +110,9 @@ export default {
'global.table.jobManagerHaAddress'
:
'JobManger 高可用地址'
,
'global.table.jobManagerHaAddress'
:
'JobManger 高可用地址'
,
'global.table.type'
:
'类型'
,
'global.table.type'
:
'类型'
,
'global.table.nickName'
:
'昵称'
,
'global.table.nickName'
:
'昵称'
,
'global.table.instanceName'
:
'
集群实例
'
,
'global.table.instanceName'
:
'
实例名
'
,
'global.table.instanceId'
:
'实例 Id'
,
'global.table.instanceId'
:
'实例 Id'
,
'global.table.clusterManagement'
:
'
集群
管理'
,
'global.table.clusterManagement'
:
'
Flink 实例
管理'
,
'global.table.create'
:
'创建'
,
'global.table.create'
:
'创建'
,
'global.table.heartbeat'
:
'心跳'
,
'global.table.heartbeat'
:
'心跳'
,
'global.table.recycle'
:
'回收'
,
'global.table.recycle'
:
'回收'
,
...
...
dlink-web/src/locales/zh-CN/menu.ts
View file @
73c044aa
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
'menu.registration'
:
'注册中心'
,
'menu.registration'
:
'注册中心'
,
'menu.registration.cluster'
:
'集群管理'
,
'menu.registration.cluster'
:
'集群管理'
,
'menu.registration.cluster.clusterInstance'
:
'
集群
实例管理'
,
'menu.registration.cluster.clusterInstance'
:
'
Flink
实例管理'
,
'menu.registration.cluster.clusterConfiguration'
:
'集群配置管理'
,
'menu.registration.cluster.clusterConfiguration'
:
'集群配置管理'
,
'menu.registration.jar'
:
'Jar 管理'
,
'menu.registration.jar'
:
'Jar 管理'
,
'menu.registration.database'
:
'数据源管理'
,
'menu.registration.database'
:
'数据源管理'
,
...
...
dlink-web/src/pages/Cluster/index.tsx
View file @
73c044aa
...
@@ -66,8 +66,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -66,8 +66,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
setFormValues
(
currentItem
);
setFormValues
(
currentItem
);
}
else
if
(
key
===
'delete'
)
{
}
else
if
(
key
===
'delete'
)
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'删除
集群
'
,
title
:
'删除
Flink 实例
'
,
content
:
'确定删除该
集群
吗?'
,
content
:
'确定删除该
Flink 实例
吗?'
,
okText
:
l
(
'button.confirm'
),
okText
:
l
(
'button.confirm'
),
cancelText
:
l
(
'button.cancel'
),
cancelText
:
l
(
'button.cancel'
),
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
...
@@ -86,13 +86,13 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -86,13 +86,13 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
const
clearCluster
=
async
()
=>
{
const
clearCluster
=
async
()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'回收
集群
'
,
title
:
'回收
Flink 实例
'
,
content
:
'确定回收所有自动创建且过期的
集群
吗?'
,
content
:
'确定回收所有自动创建且过期的
Flink 实例
吗?'
,
okText
:
l
(
'button.confirm'
),
okText
:
l
(
'button.confirm'
),
cancelText
:
l
(
'button.cancel'
),
cancelText
:
l
(
'button.cancel'
),
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
const
{
datas
}
=
await
getData
(
url
+
'/clear'
,
'回收
集群
'
,
null
);
const
{
datas
}
=
await
getData
(
url
+
'/clear'
,
'回收
Flink 实例
'
,
null
);
message
.
success
(
`成功回收
${
datas
}
个
集群
`
);
message
.
success
(
`成功回收
${
datas
}
个
Flink 实例
`
);
actionRef
.
current
?.
reloadAndRest
?.();
actionRef
.
current
?.
reloadAndRest
?.();
}
}
});
});
...
@@ -199,7 +199,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -199,7 +199,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
hideInTable
:
true
,
hideInTable
:
true
,
renderFormItem
:
(
item
,
{
defaultRender
,
...
rest
},
form
)
=>
{
renderFormItem
:
(
item
,
{
defaultRender
,
...
rest
},
form
)
=>
{
return
<
TextArea
return
<
TextArea
placeholder=
"添加 Flink
集群
的 JobManager 的 RestApi 地址。当 HA 模式时,地址间用英文逗号分隔,例如:192.168.123.101:8081,192.168.123.102:8081,192.168.123.103:8081"
placeholder=
"添加 Flink
实例
的 JobManager 的 RestApi 地址。当 HA 模式时,地址间用英文逗号分隔,例如:192.168.123.101:8081,192.168.123.102:8081,192.168.123.103:8081"
allowClear
autoSize=
{
{
minRows
:
3
,
maxRows
:
10
}
}
/>;
allowClear
autoSize=
{
{
minRows
:
3
,
maxRows
:
10
}
}
/>;
},
},
},
},
...
@@ -337,7 +337,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -337,7 +337,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
{
{
title
:
l
(
'global.table.operate'
),
title
:
l
(
'global.table.operate'
),
dataIndex
:
'option'
,
dataIndex
:
'option'
,
tooltip
:
'FLinkWebUI
连接 当集群状态为`可用`时! 支持 KUBERNETES 之外的模式
'
,
tooltip
:
'FLinkWebUI
链接地址
'
,
valueType
:
'option'
,
valueType
:
'option'
,
render
:
(
_
,
record
)
=>
[
render
:
(
_
,
record
)
=>
[
<
a
<
a
...
@@ -408,7 +408,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -408,7 +408,7 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
style=
{
{
fontWeight
:
600
}
}
>
{
selectedRowsState
.
length
}
</
a
>
style=
{
{
fontWeight
:
600
}
}
>
{
selectedRowsState
.
length
}
</
a
>
})
}
})
}
<
span
>
<
span
>
被禁用的
集群
共
{
selectedRowsState
.
length
-
selectedRowsState
.
reduce
((
pre
,
item
)
=>
pre
+
(
item
.
enabled
?
1
:
0
),
0
)
}
个
被禁用的
Flink 实例
共
{
selectedRowsState
.
length
-
selectedRowsState
.
reduce
((
pre
,
item
)
=>
pre
+
(
item
.
enabled
?
1
:
0
),
0
)
}
个
</
span
>
</
span
>
</
div
>
</
div
>
}
}
...
@@ -416,8 +416,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -416,8 +416,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
<
Button
type=
"primary"
danger
<
Button
type=
"primary"
danger
onClick=
{
()
=>
{
onClick=
{
()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'删除
集群
'
,
title
:
'删除
Flink 实例
'
,
content
:
'确定删除选中的
集群
吗?'
,
content
:
'确定删除选中的
Flink 实例
吗?'
,
okText
:
l
(
'button.confirm'
),
okText
:
l
(
'button.confirm'
),
cancelText
:
l
(
'button.cancel'
),
cancelText
:
l
(
'button.cancel'
),
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
...
@@ -433,8 +433,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -433,8 +433,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
<
Button
type=
"primary"
<
Button
type=
"primary"
onClick=
{
()
=>
{
onClick=
{
()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'启用
集群
'
,
title
:
'启用
Flink 实例
'
,
content
:
'确定启用选中的
集群
吗?'
,
content
:
'确定启用选中的
Flink 实例
吗?'
,
okText
:
l
(
'button.confirm'
),
okText
:
l
(
'button.confirm'
),
cancelText
:
l
(
'button.cancel'
),
cancelText
:
l
(
'button.cancel'
),
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
...
@@ -448,8 +448,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
...
@@ -448,8 +448,8 @@ const ClusterTableList: React.FC<{}> = (props: any) => {
<
Button
danger
<
Button
danger
onClick=
{
()
=>
{
onClick=
{
()
=>
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'禁用
集群
'
,
title
:
'禁用
Flink 实例
'
,
content
:
'确定禁用选中的
集群
吗?'
,
content
:
'确定禁用选中的
Flink 实例
吗?'
,
okText
:
l
(
'button.confirm'
),
okText
:
l
(
'button.confirm'
),
cancelText
:
l
(
'button.cancel'
),
cancelText
:
l
(
'button.cancel'
),
onOk
:
async
()
=>
{
onOk
:
async
()
=>
{
...
...
dlink-web/src/pages/DataStudio/model.ts
View file @
73c044aa
...
@@ -434,10 +434,12 @@ const Model: ModelType = {
...
@@ -434,10 +434,12 @@ const Model: ModelType = {
}
}
let
newCurrent
=
undefined
;
let
newCurrent
=
undefined
;
if
(
newTabs
.
panes
.
length
>
0
)
{
if
(
newTabs
.
panes
.
length
>
0
)
{
if
(
newTabs
.
activeKey
==
payload
)
{
newCurrent
=
newTabs
.
panes
[
newTabs
.
panes
.
length
-
1
];
newCurrent
=
newTabs
.
panes
[
newTabs
.
panes
.
length
-
1
];
}
if
(
newCurrent
&&
(
newTabs
.
activeKey
==
payload
))
{
newTabs
.
activeKey
=
newCurrent
.
key
;
newTabs
.
activeKey
=
newCurrent
.
key
;
}
else
{
newCurrent
=
state
.
current
;
}
}
else
{
}
else
{
newTabs
.
activeKey
=
undefined
;
newTabs
.
activeKey
=
undefined
;
}
}
...
...
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