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
0f2b44c0
Unverified
Commit
0f2b44c0
authored
Jul 16, 2022
by
xiaoguaiguai
Committed by
GitHub
Jul 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #719 checkpoint has error of devops (#721)
parent
f3b83961
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
36 deletions
+119
-36
index.tsx
...components/Studio/StudioRightTool/StudioHistory/index.tsx
+1
-1
index.tsx
dlink-web/src/pages/DevOps/JobInfo/CheckPoints/index.tsx
+68
-8
index.tsx
dlink-web/src/pages/DevOps/JobInfo/Config/index.tsx
+28
-27
data.d.ts
dlink-web/src/pages/DevOps/data.d.ts
+22
-0
No files found.
dlink-web/src/components/Studio/StudioRightTool/StudioHistory/index.tsx
View file @
0f2b44c0
...
@@ -63,7 +63,7 @@ const StudioHistory = (props: any) => {
...
@@ -63,7 +63,7 @@ const StudioHistory = (props: any) => {
</
div
><
br
/>
</
div
><
br
/>
<
Scrollbars
style=
{
{
height
:
"98%"
}
}
>
<
Scrollbars
style=
{
{
height
:
"98%"
}
}
>
<
React
.
StrictMode
>
<
React
.
StrictMode
>
<
MonacoDiffEditor
language=
{
"sql"
}
theme=
{
"vs-dark"
}
original=
{
originalValue
}
value=
{
currentValue
}
/>
<
MonacoDiffEditor
options=
{
{
readOnly
:
true
}
}
language=
{
"sql"
}
theme=
{
"vs-dark"
}
original=
{
originalValue
}
value=
{
currentValue
}
/>
</
React
.
StrictMode
>
</
React
.
StrictMode
>
</
Scrollbars
>
</
Scrollbars
>
</
Modal
>
</
Modal
>
...
...
dlink-web/src/pages/DevOps/JobInfo/CheckPoints/index.tsx
View file @
0f2b44c0
...
@@ -10,7 +10,8 @@ import {
...
@@ -10,7 +10,8 @@ import {
import
{
parseByteStr
,
parseMilliSecondStr
,
parseSecondStr
}
from
"@/components/Common/function"
;
import
{
parseByteStr
,
parseMilliSecondStr
,
parseSecondStr
}
from
"@/components/Common/function"
;
import
ProTable
,
{
ActionType
,
ProColumns
}
from
"@ant-design/pro-table"
;
import
ProTable
,
{
ActionType
,
ProColumns
}
from
"@ant-design/pro-table"
;
import
{
useRef
}
from
"react"
;
import
{
useRef
}
from
"react"
;
import
{
CheckPointsDetailInfo
}
from
"@/pages/DevOps/data"
;
import
{
CheckPointsDetailInfo
,
SavePointInfo
}
from
"@/pages/DevOps/data"
;
import
{
queryData
}
from
"@/components/Common/crud"
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
...
@@ -21,7 +22,7 @@ const CheckPoints = (props: any) => {
...
@@ -21,7 +22,7 @@ const CheckPoints = (props: any) => {
const
getOverview
=
()
=>
{
const
getOverview
=
()
=>
{
return
(
return
(
<>
<>
{
(
job
?.
jobHistory
?.
checkpoints
)
?
{
JSON
.
stringify
(
job
?.
jobHistory
?.
checkpoints
).
includes
(
"errors"
)
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"CheckPoint Counts"
>
<
Descriptions
.
Item
label=
"CheckPoint Counts"
>
<
Tag
color=
"blue"
title=
{
"Total"
}
>
<
Tag
color=
"blue"
title=
{
"Total"
}
>
...
@@ -71,9 +72,7 @@ const CheckPoints = (props: any) => {
...
@@ -71,9 +72,7 @@ const CheckPoints = (props: any) => {
}
}
</
Tag
>
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
:
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
}
</>
</>
)
)
...
@@ -84,7 +83,7 @@ const CheckPoints = (props: any) => {
...
@@ -84,7 +83,7 @@ const CheckPoints = (props: any) => {
return
(
return
(
<>
<>
{
(
job
?.
jobHistory
?.
checkpoints
)
?
{
JSON
.
stringify
(
job
?.
jobHistory
?.
checkpoints
).
includes
(
"errors"
)
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"End to End Duration"
>
<
Descriptions
.
Item
label=
"End to End Duration"
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
<
Tag
color=
"blue"
title=
{
"Max"
}
>
...
@@ -146,7 +145,6 @@ const CheckPoints = (props: any) => {
...
@@ -146,7 +145,6 @@ const CheckPoints = (props: any) => {
</
Tag
>
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
:
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
}
</>
</>
)
)
...
@@ -282,7 +280,7 @@ const CheckPoints = (props: any) => {
...
@@ -282,7 +280,7 @@ const CheckPoints = (props: any) => {
return
(
return
(
<>
<>
{
(
job
?.
jobHistory
?.
checkpointsConfig
)
?
{
JSON
.
stringify
(
job
?.
jobHistory
?.
checkpointsConfig
).
includes
(
"errors"
)
?
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
:
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
bordered
size=
"small"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"Checkpointing Mode"
>
<
Descriptions
.
Item
label=
"Checkpointing Mode"
>
<
Tag
color=
"blue"
title=
{
"Checkpointing Mode"
}
>
<
Tag
color=
"blue"
title=
{
"Checkpointing Mode"
}
>
...
@@ -352,13 +350,71 @@ const CheckPoints = (props: any) => {
...
@@ -352,13 +350,71 @@ const CheckPoints = (props: any) => {
</
Tag
>
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
:
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
}
}
</>
</>
)
)
}
}
function getSavePoint()
{
const
url
=
'/api/savepoints'
;
const
columns
:
ProColumns
<
SavePointInfo
>
[]
=
[
{
title
:
'ID'
,
align
:
'center'
,
dataIndex
:
'id'
,
hideInTable
:
true
,
},
{
title
:
'任务ID'
,
align
:
'center'
,
dataIndex
:
'taskId'
,
hideInTable
:
true
,
},
{
title
:
'名称'
,
align
:
'center'
,
dataIndex
:
'name'
,
},
{
title
:
'类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
},
{
title
:
'存储位置'
,
align
:
'center'
,
copyable
:
true
,
dataIndex
:
'path'
,
},
{
title
:
'触发时间'
,
align
:
'center'
,
valueType
:
'dateTime'
,
dataIndex
:
'createTime'
,
},
];
return
(
<>
<
ProTable
<
SavePointInfo
>
columns=
{
columns
}
style=
{
{
width
:
'100%'
}
}
request=
{
(
params
,
sorter
,
filter
)
=>
queryData
(
url
,
{
taskId
:
job
?.
instance
.
taskId
,
...
params
,
sorter
,
filter
})
}
actionRef=
{
actionRef
}
rowKey="id"
pagination=
{
{
pageSize
:
10
,
}
}
search=
{
false
}
size="small"
/
>
</>
)
}
return (
<>
return (
<>
<
Tabs
defaultActiveKey=
"overview"
size=
"small"
tabPosition=
"top"
style=
{
{
<
Tabs
defaultActiveKey=
"overview"
size=
"small"
tabPosition=
"top"
style=
{
{
border
:
"1px solid #f0f0f0"
,
border
:
"1px solid #f0f0f0"
,
...
@@ -378,6 +434,10 @@ const CheckPoints = (props: any) => {
...
@@ -378,6 +434,10 @@ const CheckPoints = (props: any) => {
<
TabPane
tab=
{
<
span
>
Configraution
</
span
>
}
key=
"configraution"
>
<
TabPane
tab=
{
<
span
>
Configraution
</
span
>
}
key=
"configraution"
>
{
getConfigraution
()
}
{
getConfigraution
()
}
</
TabPane
>
</
TabPane
>
<
TabPane
tab=
{
<
span
>
SavePoint
</
span
>
}
key=
"savepoint"
>
{
getSavePoint
()
}
</
TabPane
>
</
Tabs
>
</
Tabs
>
</>
)
</>
)
};
};
...
...
dlink-web/src/pages/DevOps/JobInfo/Config/index.tsx
View file @
0f2b44c0
...
@@ -46,36 +46,37 @@ const Config = (props: any) => {
...
@@ -46,36 +46,37 @@ const Config = (props: any) => {
</>
</>
<
br
/><
br
/>
<
br
/><
br
/>
<>
<>
<
Descriptions
bordered
size=
"small"
title=
{
"Flink Job Configuration"
}
>
{
!
JSON
.
stringify
(
job
?.
jobHistory
?.
config
).
includes
(
"errors"
)
&&
<
Descriptions
.
Item
label=
"Execution Mode"
>
<
Descriptions
bordered
size=
"small"
title=
{
"Flink Job Configuration"
}
>
<
Tag
color=
"blue"
title=
{
"Execution Mode"
}
>
<
Descriptions
.
Item
label=
"Execution Mode"
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'execution-mode'
]
}
<
Tag
color=
"blue"
title=
{
"Execution Mode"
}
>
</
Tag
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'execution-mode'
]
}
</
Descriptions
.
Item
>
</
Tag
>
<
Descriptions
.
Item
label=
"Restart Strategy"
>
</
Descriptions
.
Item
>
<
Tag
color=
"blue"
title=
{
"Restart Strategy"
}
>
<
Descriptions
.
Item
label=
"Restart Strategy"
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'restart-strategy'
]
}
<
Tag
color=
"blue"
title=
{
"Restart Strategy"
}
>
</
Tag
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'restart-strategy'
]
}
</
Descriptions
.
Item
>
</
Tag
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Job Parallelism"
>
<
Descriptions
.
Item
label=
"Job Parallelism"
>
<
Tag
color=
"blue"
title=
{
"Job Parallelism"
}
>
<
Tag
color=
"blue"
title=
{
"Job Parallelism"
}
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'job-parallelism'
]
}
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'job-parallelism'
]
}
</
Tag
>
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Object Reuse Mode"
>
<
Descriptions
.
Item
label=
"Object Reuse Mode"
>
<
Tag
color=
"blue"
title=
{
"Object Reuse Mode"
}
>
<
Tag
color=
"blue"
title=
{
"Object Reuse Mode"
}
>
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'object-reuse-mode'
].
toString
()
}
{
job
?.
jobHistory
?.
config
[
'execution-config'
][
'object-reuse-mode'
].
toString
()
}
</
Tag
>
</
Tag
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Flink User Configuration"
span=
{
3
}
>
<
Descriptions
.
Item
label=
"Flink User Configuration"
span=
{
3
}
>
<
Text
<
Text
code
>
{
JSON
.
stringify
(
job
?.
jobHistory
?.
config
[
'execution-config'
][
'user-config'
])
}
</
Text
>
code
>
{
JSON
.
stringify
(
job
?.
jobHistory
?.
config
[
'execution-config'
][
'user-config'
])
}
</
Text
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
}
</>
</>
</>)
</>)
};
};
...
...
dlink-web/src/pages/DevOps/data.d.ts
View file @
0f2b44c0
...
@@ -119,3 +119,25 @@ export type TaskVersion = {
...
@@ -119,3 +119,25 @@ export type TaskVersion = {
createTime
:
string
,
createTime
:
string
,
}
}
export
type
CheckPointsDetailInfo
=
{
jobID
:
number
,
historyID
:
number
,
id
:
number
,
status
:
string
,
end_to_end_duration
:
number
,
external_path
:
string
,
latest_ack_timestamp
:
number
,
state_size
:
number
,
trigger_timestamp
:
number
,
}
export
type
SavePointInfo
=
{
id
:
number
,
taskId
:
number
,
name
:
string
,
type
:
string
,
path
:
string
,
createTime
:
Date
,
}
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