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
4b361617
Unverified
Commit
4b361617
authored
Jun 26, 2022
by
aiwenmo
Committed by
GitHub
Jun 26, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Feature-644][admin,web] add snapshotinfo ,taskmanagerConfig && update configInfo of DevOps
[Feature-644][admin,web] add snapshotinfo ,taskmanagerConfig && update configInfo of DevOps
parents
5e71add4
e8148e7f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
488 additions
and
26 deletions
+488
-26
JobInfoDetail.java
dlink-admin/src/main/java/com/dlink/model/JobInfoDetail.java
+8
-0
JobManagerConfiguration.java
...rc/main/java/com/dlink/model/JobManagerConfiguration.java
+25
-0
TaskServiceImpl.java
...src/main/java/com/dlink/service/impl/TaskServiceImpl.java
+36
-4
index.tsx
dlink-web/src/pages/DevOps/JobInfo/CheckPoints/index.tsx
+266
-0
index.tsx
...b/src/pages/DevOps/JobInfo/ClusterConfiguration/index.tsx
+70
-0
index.tsx
dlink-web/src/pages/DevOps/JobInfo/Config/index.tsx
+51
-19
index.tsx
dlink-web/src/pages/DevOps/JobInfo/index.tsx
+5
-3
data.d.ts
dlink-web/src/pages/DevOps/data.d.ts
+27
-0
No files found.
dlink-admin/src/main/java/com/dlink/model/JobInfoDetail.java
View file @
4b361617
...
@@ -14,6 +14,7 @@ public class JobInfoDetail {
...
@@ -14,6 +14,7 @@ public class JobInfoDetail {
private
ClusterConfiguration
clusterConfiguration
;
private
ClusterConfiguration
clusterConfiguration
;
private
History
history
;
private
History
history
;
private
JobHistory
jobHistory
;
private
JobHistory
jobHistory
;
private
JobManagerConfiguration
jobManagerConfiguration
;
private
Integer
refreshCount
;
private
Integer
refreshCount
;
public
JobInfoDetail
(
Integer
id
)
{
public
JobInfoDetail
(
Integer
id
)
{
...
@@ -53,6 +54,13 @@ public class JobInfoDetail {
...
@@ -53,6 +54,13 @@ public class JobInfoDetail {
this
.
clusterConfiguration
=
clusterConfiguration
;
this
.
clusterConfiguration
=
clusterConfiguration
;
}
}
public
void
setJobManagerConfiguration
(
JobManagerConfiguration
jobMangerConfiguration
)
{
this
.
jobManagerConfiguration
=
jobMangerConfiguration
;
}
public
JobManagerConfiguration
getJobManagerConfiguration
()
{
return
jobManagerConfiguration
;
}
public
History
getHistory
()
{
public
History
getHistory
()
{
return
history
;
return
history
;
}
}
...
...
dlink-admin/src/main/java/com/dlink/model/JobManagerConfiguration.java
0 → 100644
View file @
4b361617
package
com
.
dlink
.
model
;
import
lombok.Data
;
import
java.util.Map
;
/**
* @program: dlink
* @description: JobManager 配置信息
* @author: zhumingye
* @create: 2022-06-26 10:53
*/
@Data
public
class
JobManagerConfiguration
{
private
Map
<
String
,
String
>
metrics
;
private
Map
<
String
,
String
>
jobManagerConfig
;
private
String
jobManagerLog
;
private
String
jobManagerStdout
;
}
dlink-admin/src/main/java/com/dlink/service/impl/TaskServiceImpl.java
View file @
4b361617
...
@@ -2,6 +2,7 @@ package com.dlink.service.impl;
...
@@ -2,6 +2,7 @@ package com.dlink.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.dlink.alert.*
;
import
com.dlink.alert.*
;
import
com.dlink.api.FlinkAPI
;
import
com.dlink.assertion.Assert
;
import
com.dlink.assertion.Assert
;
import
com.dlink.assertion.Asserts
;
import
com.dlink.assertion.Asserts
;
import
com.dlink.assertion.Tips
;
import
com.dlink.assertion.Tips
;
...
@@ -40,10 +41,7 @@ import java.time.Duration;
...
@@ -40,10 +41,7 @@ import java.time.Duration;
import
java.time.Instant
;
import
java.time.Instant
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.ChronoUnit
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 任务 服务实现类
* 任务 服务实现类
...
@@ -572,6 +570,40 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
...
@@ -572,6 +570,40 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
jobInfoDetail
.
setCluster
(
cluster
);
jobInfoDetail
.
setCluster
(
cluster
);
History
history
=
historyService
.
getById
(
jobInstance
.
getHistoryId
());
History
history
=
historyService
.
getById
(
jobInstance
.
getHistoryId
());
history
.
setConfig
(
JSONUtil
.
parseObject
(
history
.
getConfigJson
()));
history
.
setConfig
(
JSONUtil
.
parseObject
(
history
.
getConfigJson
()));
JobManagerConfiguration
jobManagerConfiguration
=
new
JobManagerConfiguration
();
if
(
Asserts
.
isNotNullString
(
history
.
getJobManagerAddress
()))
{
FlinkAPI
flinkAPI
=
FlinkAPI
.
build
(
history
.
getJobManagerAddress
());
Map
<
String
,
String
>
jobManagerMetricsMap
=
new
HashMap
<
String
,
String
>();
//获取jobManager metrics
List
<
LinkedHashMap
>
jobManagerMetricsItemsList
=
JSONUtil
.
toList
(
JSONUtil
.
toJsonString
(
flinkAPI
.
getJobManagerMetrics
()),
LinkedHashMap
.
class
);
jobManagerMetricsItemsList
.
forEach
(
mapItems
->
{
String
configKey
=
(
String
)
mapItems
.
get
(
"id"
);
String
configValue
=
(
String
)
mapItems
.
get
(
"value"
);
if
(
Asserts
.
isNotNullString
(
configKey
)
&&
Asserts
.
isNotNullString
(
configValue
))
{
jobManagerMetricsMap
.
put
(
configKey
,
configValue
);
}
});
Map
<
String
,
String
>
jobManagerConfigMap
=
new
HashMap
<
String
,
String
>();
//获取jobManager配置信息
List
<
LinkedHashMap
>
jobManagerConfigMapItemsList
=
JSONUtil
.
toList
(
JSONUtil
.
toJsonString
(
flinkAPI
.
getJobManagerConfig
()),
LinkedHashMap
.
class
);
jobManagerConfigMapItemsList
.
forEach
(
mapItems
->
{
String
configKey
=
(
String
)
mapItems
.
get
(
"key"
);
String
configValue
=
(
String
)
mapItems
.
get
(
"value"
);
if
(
Asserts
.
isNotNullString
(
configKey
)
&&
Asserts
.
isNotNullString
(
configValue
))
{
jobManagerConfigMap
.
put
(
configKey
,
configValue
);
}
});
String
jobMangerLog
=
flinkAPI
.
getJobManagerLog
();
//获取jobManager日志
String
jobManagerStdOut
=
flinkAPI
.
getJobManagerStdOut
();
//获取jobManager标准输出日志
jobManagerConfiguration
.
setMetrics
(
jobManagerMetricsMap
);
jobManagerConfiguration
.
setJobManagerConfig
(
jobManagerConfigMap
);
jobManagerConfiguration
.
setJobManagerLog
(
jobMangerLog
);
jobManagerConfiguration
.
setJobManagerStdout
(
jobManagerStdOut
);
jobInfoDetail
.
setJobManagerConfiguration
(
jobManagerConfiguration
);
}
if
(
Asserts
.
isNotNull
(
history
)
&&
Asserts
.
isNotNull
(
history
.
getClusterConfigurationId
()))
{
if
(
Asserts
.
isNotNull
(
history
)
&&
Asserts
.
isNotNull
(
history
.
getClusterConfigurationId
()))
{
jobInfoDetail
.
setClusterConfiguration
(
clusterConfigurationService
.
getClusterConfigById
(
history
.
getClusterConfigurationId
()));
jobInfoDetail
.
setClusterConfiguration
(
clusterConfigurationService
.
getClusterConfigById
(
history
.
getClusterConfigurationId
()));
}
}
...
...
dlink-web/src/pages/DevOps/JobInfo/CheckPoints/index.tsx
0 → 100644
View file @
4b361617
import
{
Descriptions
,
Empty
,
Tabs
,
Tag
}
from
'antd'
;
import
{
CheckCircleOutlined
,
CloseCircleOutlined
,
ExclamationCircleOutlined
,
RocketOutlined
,
SyncOutlined
}
from
"@ant-design/icons"
;
import
{
parseByteStr
,
parseMilliSecondStr
,
parseSecondStr
}
from
"@/components/Common/function"
;
const
{
TabPane
}
=
Tabs
;
const
CheckPoints
=
(
props
:
any
)
=>
{
const
{
job
}
=
props
;
const
getOverview
=
()
=>
{
return
(
<>
{
(
job
?.
jobHistory
?.
checkpoints
)
?
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"CheckPoint Counts"
>
<
Tag
color=
"blue"
title=
{
"Total"
}
>
<
RocketOutlined
/>
Total:
{
job
?.
jobHistory
?.
checkpoints
[
'counts'
][
'total'
]
}
</
Tag
>
<
Tag
color=
"red"
title=
{
"Failed"
}
>
<
CloseCircleOutlined
/>
Failed:
{
job
?.
jobHistory
?.
checkpoints
[
'counts'
][
'failed'
]
}
</
Tag
>
<
Tag
color=
"cyan"
title=
{
"Restored"
}
>
<
ExclamationCircleOutlined
/>
Restored:
{
job
?.
jobHistory
?.
checkpoints
[
'counts'
][
'restored'
]
}
</
Tag
>
<
Tag
color=
"green"
title=
{
"Completed"
}
>
<
CheckCircleOutlined
/>
Completed:
{
job
?.
jobHistory
?.
checkpoints
[
'counts'
][
'completed'
]
}
</
Tag
>
<
Tag
color=
"orange"
title=
{
"In Progress"
}
>
<
SyncOutlined
/>
In Progress:
{
job
?.
jobHistory
?.
checkpoints
[
'counts'
][
'in_progress'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Latest Completed CheckPoint"
>
<
Tag
color=
"green"
title=
{
"Latest Completed CheckPoint"
}
>
{
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'completed'
]
===
null
?
'None'
:
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'completed'
][
'external_path'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Latest Failed CheckPoint"
>
<
Tag
color=
"red"
title=
{
"Latest Failed CheckPoint"
}
>
{
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'failed'
]
===
null
?
'None'
:
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'failed'
][
'external_path'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Latest Restored"
>
<
Tag
color=
"cyan"
title=
{
"Latest Restored"
}
>
{
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'restored'
]
===
null
?
'None'
:
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'restored'
][
'external_path'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Latest Savepoint"
>
<
Tag
color=
"purple"
title=
{
"Latest Savepoint"
}
>
{
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'savepoint'
]
===
null
?
'None'
:
job
?.
jobHistory
?.
checkpoints
[
'latest'
][
'savepoint'
][
'external_path'
]
}
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
>
:
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
</>
)
}
const
getSummary
=
()
=>
{
return
(
<>
{
(
job
?.
jobHistory
?.
checkpoints
)
?
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"End to End Duration"
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
<
RocketOutlined
/>
Max:
{
parseSecondStr
(
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'end_to_end_duration'
][
'max'
])
}
</
Tag
>
<
Tag
color=
"green"
title=
{
"Min"
}
>
<
RocketOutlined
/>
Min:
{
parseSecondStr
(
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'end_to_end_duration'
][
'min'
])
}
</
Tag
>
<
Tag
color=
"orange"
title=
{
"Avg"
}
>
<
RocketOutlined
/>
Avg:
{
parseSecondStr
(
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'end_to_end_duration'
][
'avg'
])
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Checkpointed Data Size"
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
<
RocketOutlined
/>
Max:
{
parseByteStr
(
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'state_size'
][
'max'
])
}
</
Tag
>
<
Tag
color=
"green"
title=
{
"Min"
}
>
<
RocketOutlined
/>
Min:
{
parseByteStr
(
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'state_size'
][
'min'
])
}
</
Tag
>
<
Tag
color=
"orange"
title=
{
"Avg"
}
>
<
RocketOutlined
/>
Avg:
{
parseByteStr
(
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'state_size'
][
'avg'
])
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Processed (persisted) in-flight data"
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
<
RocketOutlined
/>
Max:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'processed_data'
][
'max'
]
}
</
Tag
>
<
Tag
color=
"green"
title=
{
"Min"
}
>
<
RocketOutlined
/>
Min:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'processed_data'
][
'min'
]
}
</
Tag
>
<
Tag
color=
"orange"
title=
{
"Avg"
}
>
<
RocketOutlined
/>
Avg:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'processed_data'
][
'avg'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Persisted data"
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
<
RocketOutlined
/>
Max:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'persisted_data'
][
'max'
]
}
</
Tag
>
<
Tag
color=
"green"
title=
{
"Min"
}
>
<
RocketOutlined
/>
Min:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'persisted_data'
][
'min'
]
}
</
Tag
>
<
Tag
color=
"orange"
title=
{
"Avg"
}
>
<
RocketOutlined
/>
Avg:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'persisted_data'
][
'avg'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Alignment Buffered"
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
<
RocketOutlined
/>
Max:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'alignment_buffered'
][
'max'
]
}
</
Tag
>
<
Tag
color=
"green"
title=
{
"Min"
}
>
<
RocketOutlined
/>
Min:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'alignment_buffered'
][
'min'
]
}
</
Tag
>
<
Tag
color=
"orange"
title=
{
"Avg"
}
>
<
RocketOutlined
/>
Avg:
{
job
?.
jobHistory
?.
checkpoints
[
'summary'
][
'alignment_buffered'
][
'avg'
]
}
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
>
:
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
</>
)
}
const
getHistory
=
()
=>
{
return
(
<>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
</>
)
}
const
getConfigraution
=
()
=>
{
return
(
<>
{
(
job
?.
jobHistory
?.
checkpointsConfig
)
?
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"Checkpointing Mode"
>
<
Tag
color=
"blue"
title=
{
"Checkpointing Mode"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'mode'
].
toUpperCase
()
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Checkpoint Storage"
>
<
Tag
color=
"blue"
title=
{
"Checkpoint Storage"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'checkpoint_storage'
]?
job
?.
jobHistory
?.
checkpointsConfig
[
'checkpoint_storage'
]
:
'Disabled'
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"State Backend"
>
<
Tag
color=
"blue"
title=
{
"State Backend"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'state_backend'
]
?
job
?.
jobHistory
?.
checkpointsConfig
[
'state_backend'
]
:
'Disabled'
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Interval"
>
<
Tag
color=
"blue"
title=
{
"Interval"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'interval'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Timeout"
>
<
Tag
color=
"blue"
title=
{
"Timeout"
}
>
{
parseMilliSecondStr
(
job
?.
jobHistory
?.
checkpointsConfig
[
'timeout'
])
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Minimum Pause Between Checkpoints"
>
<
Tag
color=
"blue"
title=
{
"Minimum Pause Between Checkpoints"
}
>
{
parseSecondStr
(
job
?.
jobHistory
?.
checkpointsConfig
[
'min_pause'
])
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Maximum Concurrent Checkpoints"
>
<
Tag
color=
"blue"
title=
{
"Maximum Concurrent Checkpoints"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'max_concurrent'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Unaligned Checkpoints "
>
<
Tag
color=
"blue"
title=
{
"Unaligned Checkpoints"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'unaligned_checkpoints'
]
?
'Enabled'
:
'Disabled'
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Persist Checkpoints Externally Enabled"
>
<
Tag
color=
"blue"
title=
{
"Persist Checkpoints Externally Enabled"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'externalization'
][
'enabled'
]
?
'Enabled'
:
'Disabled'
}
</
Tag
>
</
Descriptions
.
Item
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'externalization'
][
'enabled'
]
&&
(
<
Descriptions
.
Item
label=
"Delete On Cancellation"
>
<
Tag
color=
"blue"
title=
{
"Delete On Cancellation"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'externalization'
][
'delete_on_cancellation'
]
?
'Enabled'
:
'Disabled'
}
</
Tag
>
</
Descriptions
.
Item
>
)
}
<
Descriptions
.
Item
label=
"Tolerable Failed Checkpoints"
>
<
Tag
color=
"blue"
title=
{
"Tolerable Failed Checkpoints"
}
>
{
job
?.
jobHistory
?.
checkpointsConfig
[
'tolerable_failed_checkpoints'
]
}
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
>
:
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
</>
)
}
return
(<>
<
Tabs
defaultActiveKey=
"overview"
size=
"small"
tabPosition=
"top"
style=
{
{
border
:
"1px solid #f0f0f0"
,
}
}
>
<
TabPane
tab=
{
<
span
>
Overview
</
span
>
}
key=
"overview"
>
{
getOverview
()
}
</
TabPane
>
<
TabPane
tab=
{
<
span
>
History
</
span
>
}
key=
"history"
>
{
getHistory
()
}
</
TabPane
>
<
TabPane
tab=
{
<
span
>
Summary
</
span
>
}
key=
"summary"
>
{
getSummary
()
}
</
TabPane
>
<
TabPane
tab=
{
<
span
>
Configraution
</
span
>
}
key=
"configraution"
>
{
getConfigraution
()
}
</
TabPane
>
</
Tabs
>
</>)
};
export
default
CheckPoints
;
dlink-web/src/pages/DevOps/JobInfo/ClusterConfiguration/index.tsx
0 → 100644
View file @
4b361617
import
{
Descriptions
,
Empty
,
Tabs
}
from
'antd'
;
import
CodeShow
from
"@/components/Common/CodeShow"
;
const
{
TabPane
}
=
Tabs
;
const
ClusterConfiguration
=
(
props
:
any
)
=>
{
const
{}
=
props
;
const
{
job
}
=
props
;
const
getMetricsConfigForm
=
()
=>
{
let
formList
=
[];
let
tempData
=
job
?.
jobManagerConfiguration
?.
metrics
;
for
(
let
key
in
tempData
)
{
formList
.
push
(
<
Descriptions
.
Item
label=
{
key
}
>
{
tempData
[
key
]
}
</
Descriptions
.
Item
>
)
}
return
formList
}
const
getJobManagerConfigForm
=
()
=>
{
let
formList
=
[];
let
tempData
=
job
?.
jobManagerConfiguration
?.
jobManagerConfig
;
for
(
let
key
in
tempData
)
{
formList
.
push
(
<
Descriptions
.
Item
label=
{
key
}
>
{
tempData
[
key
]
}
</
Descriptions
.
Item
>
)
}
return
formList
}
return
(<>
<
Tabs
defaultActiveKey=
"metrics"
size=
"small"
tabPosition=
"top"
style=
{
{
border
:
"1px solid #f0f0f0"
,
}
}
>
<
TabPane
tab=
{
<
span
>
Metrics
</
span
>
}
key=
"metrics"
>
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
{
getMetricsConfigForm
()
}
</
Descriptions
>
</
TabPane
>
<
TabPane
tab=
{
<
span
>
Configuration
</
span
>
}
key=
"configuration"
>
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
{
getJobManagerConfigForm
()
}
</
Descriptions
>
</
TabPane
>
<
TabPane
tab=
{
<
span
>
Logs
</
span
>
}
key=
"logs"
>
{
(
job
?.
jobManagerConfiguration
?.
jobManagerLog
===
""
||
job
?.
jobManagerConfig
?.
jobManagerLog
===
null
)
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
<
CodeShow
code=
{
job
?.
jobManagerConfiguration
?.
jobManagerLog
}
language=
'java'
height=
'500px'
/>
}
</
TabPane
>
<
TabPane
tab=
{
<
span
>
Stdout
</
span
>
}
key=
"stdout"
>
{
(
job
?.
jobManagerConfiguration
?.
jobManagerStdout
===
""
||
job
?.
jobManagerConfig
?.
jobManagerStdout
===
null
)
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
<
CodeShow
code=
{
job
?.
jobManagerConfiguration
?.
jobManagerStdout
}
language=
'java'
height=
'500px'
/>
}
</
TabPane
>
</
Tabs
>
</>)
};
export
default
ClusterConfiguration
;
dlink-web/src/pages/DevOps/JobInfo/Config/index.tsx
View file @
4b361617
import
{
Descriptions
,
Typography
,
Tag
}
from
'antd'
;
import
{
Descriptions
,
Tag
,
Typography
}
from
'antd'
;
import
{
import
{
RocketOutlined
}
from
'@ant-design/icons'
;
RocketOutlined
}
from
'@ant-design/icons'
;
const
{
Text
,
Link
}
=
Typography
;
const
{
Text
,
Link
}
=
Typography
;
...
@@ -10,7 +8,8 @@ const Config = (props: any) => {
...
@@ -10,7 +8,8 @@ const Config = (props: any) => {
const
{
job
}
=
props
;
const
{
job
}
=
props
;
return
(<>
return
(<>
<
Descriptions
bordered
size=
"small"
>
<>
<
Descriptions
bordered
size=
"small"
title=
{
"Dinky Job Configuration"
}
>
<
Descriptions
.
Item
label=
"执行模式"
>
{
job
?.
history
?.
type
?
(
<
Descriptions
.
Item
label=
"执行模式"
>
{
job
?.
history
?.
type
?
(
<
Tag
color=
"blue"
key=
{
job
?.
history
?.
type
}
>
<
Tag
color=
"blue"
key=
{
job
?.
history
?.
type
}
>
<
RocketOutlined
/>
{
job
?.
history
?.
type
}
<
RocketOutlined
/>
{
job
?.
history
?.
type
}
...
@@ -18,33 +17,66 @@ const Config = (props: any) => {
...
@@ -18,33 +17,66 @@ const Config = (props: any) => {
)
:
undefined
}
)
:
undefined
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"集群实例"
>
<
Descriptions
.
Item
label=
"集群实例"
>
{
job
?.
cluster
?.
alias
?<
Link
>
{
job
?.
cluster
?.
alias
}
</
Link
>:
'-'
}
{
job
?.
cluster
?.
alias
?
<
Link
>
{
job
?.
cluster
?.
alias
}
</
Link
>
:
'-'
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"集群配置"
>
<
Descriptions
.
Item
label=
"集群配置"
>
{
job
?.
clusterConfiguration
?.
alias
?<
Link
>
{
job
?.
clusterConfiguration
?.
alias
}
</
Link
>:
'-'
}
{
job
?.
clusterConfiguration
?.
alias
?
<
Link
>
{
job
?.
clusterConfiguration
?.
alias
}
</
Link
>
:
'-'
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"共享会话"
>
<
Descriptions
.
Item
label=
"共享会话"
>
{
job
?.
history
?.
session
?<
Link
>
{
job
?.
history
?.
session
}
</
Link
>:
'禁用'
}
{
job
?.
history
?.
session
?
<
Link
>
{
job
?.
history
?.
session
}
</
Link
>
:
'禁用'
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"片段机制"
>
{
job
?.
history
?.
config
.
useSqlFragment
?
'启用'
:
'禁用'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"片段机制"
>
{
job
?.
history
?.
config
.
useSqlFragment
?
'启用'
:
'禁用'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"语句集"
>
{
job
?.
history
?.
config
.
useStatementSet
?
'启用'
:
'禁用'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"语句集"
>
{
job
?.
history
?.
config
.
useStatementSet
?
'启用'
:
'禁用'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"任务类型"
>
{
job
?.
history
?.
config
.
isJarTask
?
'Jar'
:
'FlinkSQL'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"任务类型"
>
{
job
?.
history
?.
config
.
isJarTask
?
'Jar'
:
'FlinkSQL'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"批模式"
>
{
job
?.
history
?.
config
.
useBatchModel
?
'启用'
:
'禁用'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"批模式"
>
{
job
?.
history
?.
config
.
useBatchModel
?
'启用'
:
'禁用'
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"CheckPoint"
>
{
job
?.
history
?.
config
.
checkpoint
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"CheckPoint"
>
{
job
?.
history
?.
config
.
checkpoint
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"SavePoint机制"
>
<
Descriptions
.
Item
label=
"SavePoint机制"
>
{
job
?.
history
?.
config
.
savePointStrategy
==
'NONE'
?
'禁用'
:
{
job
?.
history
?.
config
.
savePointStrategy
==
'NONE'
?
'禁用'
:
job
?.
history
?.
config
.
savePointStrategy
==
'LATEST'
?
'最近一次'
:
job
?.
history
?.
config
.
savePointStrategy
==
'LATEST'
?
'最近一次'
:
job
?.
history
?.
config
.
savePointStrategy
==
'EARLIEST'
?
'最早一次'
:
job
?.
history
?.
config
.
savePointStrategy
==
'EARLIEST'
?
'最早一次'
:
job
?.
history
?.
config
.
savePointStrategy
==
'CUSTOM'
?
'指定一次'
:
'禁用'
}
job
?.
history
?.
config
.
savePointStrategy
==
'CUSTOM'
?
'指定一次'
:
'禁用'
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"SavePoint"
span=
{
2
}
>
{
job
?.
history
?.
config
.
savePointPath
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"SavePoint"
span=
{
2
}
>
{
job
?.
history
?.
config
.
savePointPath
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Flink Configuration"
span=
{
3
}
><
Text
code
>
{
JSON
.
stringify
(
job
?.
history
?.
config
.
config
)
}
</
Text
></
Descriptions
.
Item
>
{
job
?.
jar
?
<>
{
job
?.
jar
?<>
<
Descriptions
.
Item
label=
"Jar 路径"
>
{
job
?.
jar
?.
path
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Jar 路径"
>
{
job
?.
jar
?.
path
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Jar 主类"
>
{
job
?.
jar
?.
mainClass
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Jar 主类"
>
{
job
?.
jar
?.
mainClass
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Jar 入参"
>
{
job
?.
jar
?.
paras
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Jar 入参"
>
{
job
?.
jar
?.
paras
}
</
Descriptions
.
Item
>
</>
:
undefined
}
</>
:
undefined
}
</
Descriptions
>
</
Descriptions
>
</>
<
br
/><
br
/>
<>
<
Descriptions
bordered
size=
"small"
title=
{
"Flink Job Configuration"
}
>
<
Descriptions
.
Item
label=
"Execution Mode"
>
<
Tag
color=
"blue"
title=
{
"Execution Mode"
}
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'execution-mode'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Restart Strategy"
>
<
Tag
color=
"blue"
title=
{
"Restart Strategy"
}
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'restart-strategy'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Job Parallelism"
>
<
Tag
color=
"blue"
title=
{
"Job Parallelism"
}
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'job-parallelism'
]
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Object Reuse Mode"
>
<
Tag
color=
"blue"
title=
{
"Object Reuse Mode"
}
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'object-reuse-mode'
].
toString
()
}
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Flink User Configuration"
span=
{
3
}
>
<
Text
code
>
{
JSON
.
stringify
(
job
?.
jobHistory
?.
config
[
'execution-config'
][
'user-config'
])
}
</
Text
>
</
Descriptions
.
Item
>
</
Descriptions
>
</>
</>)
</>)
};
};
...
...
dlink-web/src/pages/DevOps/JobInfo/index.tsx
View file @
4b361617
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
history
,
useLocation
}
from
'umi'
;
import
{
history
,
useLocation
}
from
'umi'
;
import
{
ClusterOutlined
,
EllipsisOutlined
,
FireOutlined
,
RedoOutlined
,
RocketOutlined
}
from
'@ant-design/icons'
;
import
{
ClusterOutlined
,
EllipsisOutlined
,
FireOutlined
,
RedoOutlined
,
RocketOutlined
}
from
'@ant-design/icons'
;
import
{
Button
,
Dropdown
,
Empty
,
Menu
,
message
,
Modal
,
Space
,
Tag
,
Typography
}
from
'antd'
;
import
{
Button
,
Dropdown
,
Empty
,
Menu
,
message
,
Modal
,
Space
,
Tag
,
Typography
}
from
'antd'
;
...
@@ -17,6 +17,8 @@ import Exception from "@/pages/DevOps/JobInfo/Exception";
...
@@ -17,6 +17,8 @@ import Exception from "@/pages/DevOps/JobInfo/Exception";
import
FlinkSQL
from
"@/pages/DevOps/JobInfo/FlinkSQL"
;
import
FlinkSQL
from
"@/pages/DevOps/JobInfo/FlinkSQL"
;
import
Alert
from
"@/pages/DevOps/JobInfo/Alert"
;
import
Alert
from
"@/pages/DevOps/JobInfo/Alert"
;
import
DataMap
from
"@/pages/DevOps/JobInfo/DataMap"
;
import
DataMap
from
"@/pages/DevOps/JobInfo/DataMap"
;
import
CheckPoints
from
"@/pages/DevOps/JobInfo/CheckPoints"
;
import
ClusterConfiguration
from
"@/pages/DevOps/JobInfo/ClusterConfiguration"
;
const
{
Link
}
=
Typography
;
const
{
Link
}
=
Typography
;
...
@@ -257,8 +259,8 @@ const JobInfo = (props: any) => {
...
@@ -257,8 +259,8 @@ const JobInfo = (props: any) => {
<
ProCard
>
<
ProCard
>
{
tabKey
===
'base'
?
<
BaseInfo
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'base'
?
<
BaseInfo
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'config'
?
<
Config
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'config'
?
<
Config
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'cluster'
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
undefined
}
{
tabKey
===
'cluster'
?
<
ClusterConfiguration
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'snapshot'
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
undefined
}
{
tabKey
===
'snapshot'
?
<
CheckPoints
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'exception'
?
<
Exception
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'exception'
?
<
Exception
job=
{
job
}
/>
:
undefined
}
{
tabKey
===
'log'
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
undefined
}
{
tabKey
===
'log'
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
undefined
}
{
tabKey
===
'optimize'
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
undefined
}
{
tabKey
===
'optimize'
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
undefined
}
...
...
dlink-web/src/pages/DevOps/data.d.ts
View file @
4b361617
...
@@ -45,6 +45,8 @@ export type JobInfoDetail = {
...
@@ -45,6 +45,8 @@ export type JobInfoDetail = {
cluster
:
ClusterTableListItem
,
cluster
:
ClusterTableListItem
,
clusterConfiguration
:
ClusterConfigurationTableListItem
,
clusterConfiguration
:
ClusterConfigurationTableListItem
,
history
:
HistoryItem
,
history
:
HistoryItem
,
jobHistory
:
JobHistoryItem
,
jobManagerConfiguration
:
JobManagerConfiguration
jar
:
JarTableListItem
jar
:
JarTableListItem
}
}
...
@@ -58,3 +60,28 @@ export type VerticesTableListItem = {
...
@@ -58,3 +60,28 @@ export type VerticesTableListItem = {
endTime
:
string
,
endTime
:
string
,
tasks
:
any
,
tasks
:
any
,
}
}
export
type
JobHistoryItem
=
{
id
:
number
,
job
:
string
,
exceptions
:
string
,
checkpoints
:
string
,
checkpointsConfig
:
string
,
config
:
string
,
jar
:
string
,
cluster
:
string
,
clusterConfiguration
:
string
,
updateTime
:
string
,
}
export
type
JobManagerConfiguration
=
{
metrics
:
string
,
jobManagerConfig
:
string
,
jobManagerLog
:
string
,
jobManagerStdout
:
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