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
bb8b272d
Unverified
Commit
bb8b272d
authored
Sep 25, 2023
by
gaoyan
Committed by
GitHub
Sep 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Feature][Web]Add flink dag (#2337)
* fix k8s submit bug * formate code * add flink dag * formate code * formate code
parent
8ce42006
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
640 additions
and
17 deletions
+640
-17
package.json
dinky-web/package.json
+3
-0
DagNode.tsx
dinky-web/src/components/FlinkDag/component/DagNode.tsx
+63
-0
config.ts
dinky-web/src/components/FlinkDag/config.ts
+168
-0
functions.tsx
dinky-web/src/components/FlinkDag/functions.tsx
+150
-0
index.css
dinky-web/src/components/FlinkDag/index.css
+24
-0
index.tsx
dinky-web/src/components/FlinkDag/index.tsx
+100
-0
StatusTag.tsx
dinky-web/src/components/JobTags/StatusTag.tsx
+101
-0
JobOverview.tsx
...eb/src/pages/DevOps/JobDetail/JobOverview/JobOverview.tsx
+11
-0
index.tsx
dinky-web/src/pages/DevOps/JobDetail/index.tsx
+2
-1
index.tsx
...ster/Configuration/components/ConfigurationList/index.tsx
+1
-1
index.tsx
...s/ConfigurationModal/ConfigurationForm/FlinkK8s/index.tsx
+3
-12
data.d.ts
dinky-web/src/types/DevOps/data.d.ts
+14
-3
No files found.
dinky-web/package.json
View file @
bb8b272d
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
"@ant-design/pro-layout"
:
"^7.13.3"
,
"@ant-design/pro-layout"
:
"^7.13.3"
,
"@ant-design/pro-table"
:
"^3.6.9"
,
"@ant-design/pro-table"
:
"^3.6.9"
,
"@ant-design/use-emotion-css"
:
"^1.0.4"
,
"@ant-design/use-emotion-css"
:
"^1.0.4"
,
"@antv/x6"
:
"^2.15.1"
,
"@antv/x6-plugin-selection"
:
"^2.2.1"
,
"@antv/x6-react-shape"
:
"^2.2.2"
,
"@monaco-editor/react"
:
"^4.5.1"
,
"@monaco-editor/react"
:
"^4.5.1"
,
"@umijs/route-utils"
:
"^4.0.1"
,
"@umijs/route-utils"
:
"^4.0.1"
,
"antd"
:
"^5.6.1"
,
"antd"
:
"^5.6.1"
,
...
...
dinky-web/src/components/FlinkDag/component/DagNode.tsx
0 → 100644
View file @
bb8b272d
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
StatusTag
from
'@/components/JobTags/StatusTag'
;
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
Card
,
Col
,
Row
,
Tag
,
Typography
}
from
'antd'
;
const
{
Text
}
=
Typography
;
const
DagNode
=
(
props
:
any
)
=>
{
const
{
node
}
=
props
;
const
vertices
:
Jobs
.
JobVertices
=
node
?.
getData
();
return
(
<
Card
style=
{
{
width
:
'250px'
}
}
bordered=
{
false
}
size=
{
'small'
}
type=
{
'inner'
}
hoverable=
{
true
}
title=
{
vertices
.
name
}
extra=
{
<
Text
keyboard
>
{
vertices
.
parallelism
}
</
Text
>
}
>
<
Row
>
<
Col
span=
{
15
}
>
<
Text
type=
'secondary'
>
BackPressure:
</
Text
>
<
Tag
bordered=
{
false
}
color=
'success'
>
OK
</
Tag
>
</
Col
>
<
Col
span=
{
8
}
>
<
Text
type=
'secondary'
>
Busy:97%
</
Text
>
</
Col
>
</
Row
>
<
Row
>
<
Col
span=
{
15
}
>
<
Text
type=
'secondary'
>
Status:
</
Text
>
<
StatusTag
status=
{
vertices
.
status
}
bordered=
{
false
}
animation=
{
false
}
/>
</
Col
>
<
Col
span=
{
8
}
>
<
Text
type=
'secondary'
>
Idle:50%
</
Text
>
</
Col
>
</
Row
>
</
Card
>
);
};
export
default
DagNode
;
dinky-web/src/components/FlinkDag/config.ts
0 → 100644
View file @
bb8b272d
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
{
DagreLayoutOptions
}
from
'@antv/layout/lib/layout/types'
;
import
{
Platform
}
from
'@antv/x6'
;
import
{
Options
}
from
'@antv/x6/lib/graph/options'
;
import
Connecting
=
Options
.
Connecting
;
import
Manual
=
Options
.
Manual
;
export
const
edgeConfig
=
{
markup
:
[
{
tagName
:
'path'
,
selector
:
'wrap'
,
attrs
:
{
fill
:
'none'
,
cursor
:
'pointer'
,
stroke
:
'transparent'
,
strokeLinecap
:
'round'
}
},
{
tagName
:
'path'
,
selector
:
'line'
,
attrs
:
{
fill
:
'none'
,
pointerEvents
:
'none'
}
}
],
connector
:
{
name
:
'curveConnector'
},
attrs
:
{
wrap
:
{
connection
:
true
,
strokeWidth
:
1
,
strokeLinejoin
:
'round'
},
line
:
{
connection
:
true
,
stroke
:
'#A2B1C3'
,
strokeWidth
:
1
,
targetMarker
:
{
name
:
'classic'
,
size
:
6
}
},
text
:
{
fontSize
:
12
},
rect
:
{
// fill: 'transparent',
}
}
};
export
const
portConfig
=
{
groups
:
{
in
:
{
position
:
'left'
,
attrs
:
{
circle
:
{
r
:
4
,
magnet
:
true
,
stroke
:
'transparent'
,
strokeWidth
:
1
,
fill
:
'transparent'
}
}
},
out
:
{
position
:
{
name
:
'right'
,
args
:
{
dx
:
-
32
}
},
attrs
:
{
circle
:
{
r
:
4
,
magnet
:
true
,
stroke
:
'transparent'
,
strokeWidth
:
1
,
fill
:
'transparent'
}
}
}
}
};
export
const
graphConnectConfig
:
Partial
<
Connecting
>
=
{
snap
:
true
,
allowBlank
:
false
,
allowLoop
:
false
,
highlight
:
true
,
sourceAnchor
:
{
name
:
'left'
,
args
:
{
dx
:
Platform
.
IS_SAFARI
?
4
:
8
}
},
targetAnchor
:
{
name
:
'right'
,
args
:
{
dx
:
Platform
.
IS_SAFARI
?
4
:
-
8
}
},
// Connection pile verification
validateConnection
({
sourceMagnet
,
targetMagnet
})
{
// Connections can only be created from output link stubs
if
(
!
sourceMagnet
||
sourceMagnet
.
getAttribute
(
'port-group'
)
===
'in'
)
{
return
false
;
}
// You can only connect to input link stubs
return
!
(
!
targetMagnet
||
targetMagnet
.
getAttribute
(
'port-group'
)
!==
'in'
);
}
};
export
const
graphConfig
:
Partial
<
Manual
>
=
{
// The canvas can be moved using the mouse
panning
:
{
enabled
:
true
,
eventTypes
:
[
'leftMouseDown'
,
'mouseWheel'
]
},
// Moving nodes beyond the canvas is prohibited
translating
:
{
restrict
:
true
},
// Prohibit moving nodes
interacting
:
{
nodeMovable
:
false
},
// Control scaling via CTRL
mousewheel
:
{
enabled
:
true
,
modifiers
:
'ctrl'
,
factor
:
1.1
,
maxScale
:
1.5
,
minScale
:
0.5
},
connecting
:
graphConnectConfig
};
export
const
layoutConfig
:
DagreLayoutOptions
=
{
type
:
'dagre'
,
rankdir
:
'LR'
,
align
:
'UL'
,
ranksep
:
120
,
nodesep
:
40
,
controlPoints
:
true
};
dinky-web/src/components/FlinkDag/functions.tsx
0 → 100644
View file @
bb8b272d
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
Graph
,
Path
}
from
'@antv/x6'
;
export
const
buildEdge
=
(
job
:
Jobs
.
Job
)
=>
{
const
edges
:
any
=
[];
for
(
let
node
of
job
.
plan
.
nodes
)
{
if
(
node
.
inputs
)
{
const
sources
=
node
.
inputs
;
for
(
let
i
=
0
;
i
<
sources
.
length
;
i
++
)
{
const
plan_node
=
sources
[
i
];
edges
.
push
({
attrs
:
{
line
:
{
strokeDasharray
:
'5'
,
stroke
:
'#3471F9'
,
style
:
{
animation
:
'running-line 30s infinite linear'
}
},
label
:
{
text
:
plan_node
.
ship_strategy
}
},
label
:
plan_node
.
ship_strategy
,
id
:
`
${
plan_node
.
id
}
-
${
i
}
`
,
shape
:
'data-processing-curve'
,
zIndex
:
-
1
,
source
:
{
cell
:
`
${
plan_node
.
id
}
`
,
port
:
`
${
plan_node
.
id
}
-out`
},
target
:
{
cell
:
`
${
node
.
id
}
`
,
port
:
`
${
node
.
id
}
-in`
},
data
:
node
});
}
}
}
return
edges
;
};
export
const
buildNode
=
(
job
:
Jobs
.
Job
)
=>
{
const
nodes
:
any
=
{};
for
(
let
vertice
of
job
.
vertices
)
{
nodes
[
vertice
.
id
]
=
{
id
:
vertice
.
id
,
shape
:
'data-processing-dag-node'
,
ports
:
[
{
id
:
`
${
vertice
.
id
}
-in`
,
group
:
'in'
},
{
id
:
`
${
vertice
.
id
}
-out`
,
group
:
'out'
}
],
data
:
vertice
};
}
return
nodes
;
};
export
const
buildData
=
(
job
:
Jobs
.
Job
)
=>
{
const
nodes
=
Object
.
values
(
buildNode
(
job
));
return
{
nodes
:
nodes
,
edges
:
buildEdge
(
job
)
};
};
export
const
updateEdge
=
(
job
:
Jobs
.
Job
,
graph
?:
Graph
)
=>
{
if
(
graph
)
{
const
nodes
=
buildNode
(
job
);
graph
.
getCells
().
forEach
((
node
)
=>
{
const
data
=
node
.
getData
();
if
(
nodes
[
data
.
id
])
{
console
.
log
(
nodes
[
data
.
id
]);
node
.
setData
(
nodes
[
data
.
id
].
data
);
}
});
graph
.
getEdges
().
forEach
((
edge
)
=>
{
const
node
=
edge
.
getSourceNode
()?.
getData
();
if
(
node
.
status
==
'RUNNING'
)
{
edge
.
attr
({
line
:
{
stroke
:
'#3471F9'
}
});
edge
.
attr
(
'line/strokeDasharray'
,
5
);
edge
.
attr
(
'line/strokeWidth'
,
2
);
edge
.
attr
(
'line/style/animation'
,
'running-line 30s infinite linear'
);
}
else
{
edge
.
attr
(
'line/strokeDasharray'
,
0
);
edge
.
attr
(
'line/style/animation'
,
''
);
edge
.
attr
(
'line/strokeWidth'
,
1
);
if
(
node
.
status
==
'FINISHED'
)
{
edge
.
attr
(
'line/stroke'
,
'#52c41a'
);
}
else
if
(
node
.
status
==
'CANCELED'
)
{
edge
.
attr
(
'line/stroke'
,
'#ffe7ba'
);
}
else
if
(
node
.
status
==
'FAILED'
)
{
edge
.
attr
(
'line/stroke'
,
'#ff4d4f'
);
}
else
{
edge
.
attr
(
'line/stroke'
,
'#bfbfbf'
);
}
}
});
}
};
export
const
regConnect
=
(
sourcePoint
:
any
,
targetPoint
:
any
)
=>
{
const
hgap
=
Math
.
abs
(
targetPoint
.
x
-
sourcePoint
.
x
);
const
path
=
new
Path
();
path
.
appendSegment
(
Path
.
createSegment
(
'M'
,
sourcePoint
.
x
-
4
,
sourcePoint
.
y
));
path
.
appendSegment
(
Path
.
createSegment
(
'L'
,
sourcePoint
.
x
+
12
,
sourcePoint
.
y
));
// 水平三阶贝塞尔曲线
path
.
appendSegment
(
Path
.
createSegment
(
'C'
,
sourcePoint
.
x
<
targetPoint
.
x
?
sourcePoint
.
x
+
hgap
/
2
:
sourcePoint
.
x
-
hgap
/
2
,
sourcePoint
.
y
,
sourcePoint
.
x
<
targetPoint
.
x
?
targetPoint
.
x
-
hgap
/
2
:
targetPoint
.
x
+
hgap
/
2
,
targetPoint
.
y
,
targetPoint
.
x
-
6
,
targetPoint
.
y
)
);
path
.
appendSegment
(
Path
.
createSegment
(
'L'
,
targetPoint
.
x
+
2
,
targetPoint
.
y
));
return
path
.
serialize
();
};
dinky-web/src/components/FlinkDag/index.css
0 → 100644
View file @
bb8b272d
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
@keyframes
running-line
{
to
{
stroke-dashoffset
:
-1000
;
}
}
dinky-web/src/components/FlinkDag/index.tsx
0 → 100644
View file @
bb8b272d
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
DagNode
from
'@/components/FlinkDag/component/DagNode'
;
import
{
edgeConfig
,
graphConfig
,
layoutConfig
,
portConfig
}
from
'@/components/FlinkDag/config'
;
import
{
buildData
,
regConnect
,
updateEdge
}
from
'@/components/FlinkDag/functions'
;
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
DagreLayout
}
from
'@antv/layout'
;
import
{
Edge
,
Graph
}
from
'@antv/x6'
;
import
{
register
}
from
'@antv/x6-react-shape'
;
import
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
'./index.css'
;
const
FlinkDag
=
(
props
:
{
jobDetail
:
Jobs
.
JobInfoDetail
})
=>
{
const
container
=
useRef
(
null
);
const
job
=
props
.
jobDetail
.
jobDataDto
.
job
;
const
[
graph
,
setGraph
]
=
useState
<
Graph
>
();
const
[
curentJob
,
setCurentJob
]
=
useState
<
string
>
();
const
initGraph
=
(
flinkData
:
any
)
=>
{
register
({
shape
:
'data-processing-dag-node'
,
width
:
212
,
height
:
48
,
component
:
DagNode
,
ports
:
portConfig
});
Edge
.
config
(
edgeConfig
);
Graph
.
registerConnector
(
'curveConnector'
,
regConnect
,
true
);
Graph
.
registerEdge
(
'data-processing-curve'
,
Edge
,
true
);
const
graph
:
Graph
=
new
Graph
({
// @ts-ignore
container
:
container
.
current
,
...
graphConfig
});
// Adaptive layout
const
dagreLayout
=
new
DagreLayout
(
layoutConfig
);
const
model
=
dagreLayout
.
layout
(
flinkData
);
graph
.
fromJSON
(
model
);
// Automatically zoom to fit
const
zoomOptions
=
{
padding
:
{
left
:
50
,
right
:
50
,
bottom
:
100
}
};
graph
.
zoomToFit
(
zoomOptions
);
graph
.
centerContent
();
return
graph
;
};
useEffect
(()
=>
{
const
flinkData
=
buildData
(
job
);
// Clean up old data
if
(
graph
)
{
graph
.
clearCells
();
}
setGraph
(
initGraph
(
flinkData
));
},
[
curentJob
]);
useEffect
(()
=>
{
updateEdge
(
job
,
graph
);
if
(
curentJob
!=
job
.
jid
)
{
setCurentJob
(
job
.
jid
);
}
},
[
job
]);
return
(
<
div
style=
{
{
height
:
'100%'
,
width
:
'100%'
}
}
ref=
{
container
}
/>
);
};
export
default
FlinkDag
;
dinky-web/src/components/JobTags/StatusTag.tsx
0 → 100644
View file @
bb8b272d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import
{
JOB_STATUS
}
from
'@/pages/DevOps/constants'
;
import
{
CheckCircleOutlined
,
ClockCircleOutlined
,
CloseCircleOutlined
,
MinusCircleOutlined
,
QuestionCircleOutlined
,
SyncOutlined
}
from
'@ant-design/icons'
;
import
{
Tag
}
from
'antd'
;
export
interface
StatusTagProps
{
status
:
string
;
animation
?:
boolean
;
bordered
?:
boolean
;
}
const
StatusTag
=
(
props
:
StatusTagProps
)
=>
{
const
{
status
,
animation
=
true
,
bordered
=
true
}
=
props
;
const
buildParam
=
()
=>
{
switch
(
status
)
{
case
JOB_STATUS
.
RUNNING
:
return
{
icon
:
<
SyncOutlined
spin
/>,
color
:
'success'
,
text
:
'RUNNING'
};
case
JOB_STATUS
.
FINISHED
:
return
{
icon
:
<
CheckCircleOutlined
/>,
color
:
'blue'
,
text
:
'FINISHED'
};
case
JOB_STATUS
.
CANCELED
:
return
{
icon
:
<
MinusCircleOutlined
/>,
color
:
'orange'
,
text
:
'CANCELED'
};
case
JOB_STATUS
.
INITIALIZING
:
return
{
icon
:
<
ClockCircleOutlined
/>,
color
:
'default'
,
text
:
'INITIALIZING'
};
case
JOB_STATUS
.
RESTARTING
:
return
{
icon
:
<
ClockCircleOutlined
/>,
color
:
'default'
,
text
:
'RESTARTING'
};
case
JOB_STATUS
.
CREATED
:
return
{
icon
:
<
ClockCircleOutlined
/>,
color
:
'default'
,
text
:
'CREATED'
};
case
JOB_STATUS
.
UNKNOWN
:
return
{
icon
:
<
QuestionCircleOutlined
/>,
color
:
'default'
,
text
:
'UNKNOWN'
};
default
:
return
{
icon
:
<
CloseCircleOutlined
/>,
color
:
'error'
,
text
:
'FAILED'
};
}
};
const
param
=
buildParam
();
return
(
<
Tag
icon=
{
animation
?
param
.
icon
:
undefined
}
color=
{
param
.
color
}
bordered=
{
bordered
}
>
{
param
.
text
}
</
Tag
>
);
};
export
default
StatusTag
;
dinky-web/src/pages/DevOps/JobDetail/JobOverview/JobOverview.tsx
View file @
bb8b272d
...
@@ -17,9 +17,11 @@
...
@@ -17,9 +17,11 @@
*
*
*/
*/
import
FlinkDag
from
'@/components/FlinkDag'
;
import
{
JobProps
}
from
'@/pages/DevOps/JobDetail/data'
;
import
{
JobProps
}
from
'@/pages/DevOps/JobDetail/data'
;
import
FlinkTable
from
'@/pages/DevOps/JobDetail/JobOverview/components/FlinkTable'
;
import
FlinkTable
from
'@/pages/DevOps/JobDetail/JobOverview/components/FlinkTable'
;
import
JobDesc
from
'@/pages/DevOps/JobDetail/JobOverview/components/JobDesc'
;
import
JobDesc
from
'@/pages/DevOps/JobDetail/JobOverview/components/JobDesc'
;
import
{
ProCard
}
from
'@ant-design/pro-components'
;
const
JobConfigTab
=
(
props
:
JobProps
)
=>
{
const
JobConfigTab
=
(
props
:
JobProps
)
=>
{
const
{
jobDetail
}
=
props
;
const
{
jobDetail
}
=
props
;
...
@@ -27,6 +29,15 @@ const JobConfigTab = (props: JobProps) => {
...
@@ -27,6 +29,15 @@ const JobConfigTab = (props: JobProps) => {
return
(
return
(
<>
<>
<
JobDesc
jobDetail=
{
jobDetail
}
/>
<
JobDesc
jobDetail=
{
jobDetail
}
/>
<
ProCard
style=
{
{
height
:
'40vh'
}
}
>
<
FlinkDag
jobDetail=
{
jobDetail
}
/>
</
ProCard
>
<
FlinkTable
jobDetail=
{
jobDetail
}
/>
<
FlinkTable
jobDetail=
{
jobDetail
}
/>
</>
</>
);
);
...
...
dinky-web/src/pages/DevOps/JobDetail/index.tsx
View file @
bb8b272d
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
*
*
*/
*/
import
Lineage
from
'@/components/FlinkDag'
;
import
{
TagJobLifeCycle
}
from
'@/pages/DevOps/function'
;
import
{
TagJobLifeCycle
}
from
'@/pages/DevOps/function'
;
import
CheckPoints
from
'@/pages/DevOps/JobDetail/CheckPointsTab'
;
import
CheckPoints
from
'@/pages/DevOps/JobDetail/CheckPointsTab'
;
import
JobLogsTab
from
'@/pages/DevOps/JobDetail/JobLogs/JobLogsTab'
;
import
JobLogsTab
from
'@/pages/DevOps/JobDetail/JobLogs/JobLogsTab'
;
...
@@ -71,7 +72,7 @@ const JobDetail = (props: any) => {
...
@@ -71,7 +72,7 @@ const JobDetail = (props: any) => {
[
OperatorEnum
.
JOB_VERSION
]:
<
JobVersionTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_VERSION
]:
<
JobVersionTab
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_CHECKPOINTS
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_CHECKPOINTS
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_METRICS
]:
<
JobMetrics
/>
,
[
OperatorEnum
.
JOB_METRICS
]:
<
JobMetrics
/>
,
[
OperatorEnum
.
JOB_LINEAGE
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_LINEAGE
]:
<
Lineage
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_ALERT
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_ALERT
]:
<
CheckPoints
jobDetail
=
{
jobInfoDetail
}
/>
,
[
OperatorEnum
.
JOB_GRAPH
]:
<
JobOperatorGraph
jobDetail
=
{
jobInfoDetail
}
/
>
[
OperatorEnum
.
JOB_GRAPH
]:
<
JobOperatorGraph
jobDetail
=
{
jobInfoDetail
}
/
>
};
};
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationList/index.tsx
View file @
bb8b272d
...
@@ -174,7 +174,7 @@ export default () => {
...
@@ -174,7 +174,7 @@ export default () => {
setClusterConfigState
((
prevState
)
=>
({
setClusterConfigState
((
prevState
)
=>
({
...
prevState
,
...
prevState
,
editOpen
:
true
,
editOpen
:
true
,
value
:
{
...
item
}
value
:
{
...
item
}
}));
}));
};
};
...
...
dinky-web/src/pages/RegCenter/Cluster/Configuration/components/ConfigurationModal/ConfigurationForm/FlinkK8s/index.tsx
View file @
bb8b272d
...
@@ -71,10 +71,7 @@ const FlinkK8s = (props: { type: string; value: any } & connect) => {
...
@@ -71,10 +71,7 @@ const FlinkK8s = (props: { type: string; value: any } & connect) => {
label
:
<
TagAlignCenter
>
Default Pod Template
</
TagAlignCenter
>,
label
:
<
TagAlignCenter
>
Default Pod Template
</
TagAlignCenter
>,
children
:
(
children
:
(
<
ProFormItem
key=
'dpe'
name=
{
[
'config'
,
'kubernetesConfig'
,
'podTemplate'
]
}
>
<
ProFormItem
key=
'dpe'
name=
{
[
'config'
,
'kubernetesConfig'
,
'podTemplate'
]
}
>
<
CodeEdit
<
CodeEdit
{
...
CodeEditProps
}
code=
{
value
.
config
?.
kubernetesConfig
?.
podTemplate
??
''
}
/>
{
...
CodeEditProps
}
code=
{
value
.
config
?.
kubernetesConfig
?.
podTemplate
??
''
}
/>
</
ProFormItem
>
</
ProFormItem
>
)
)
},
},
...
@@ -83,10 +80,7 @@ const FlinkK8s = (props: { type: string; value: any } & connect) => {
...
@@ -83,10 +80,7 @@ const FlinkK8s = (props: { type: string; value: any } & connect) => {
label
:
<
TagAlignCenter
>
JM Pod Template
</
TagAlignCenter
>,
label
:
<
TagAlignCenter
>
JM Pod Template
</
TagAlignCenter
>,
children
:
(
children
:
(
<
ProFormItem
key=
'jmdpe'
name=
{
[
'config'
,
'kubernetesConfig'
,
'jmPodTemplate'
]
}
>
<
ProFormItem
key=
'jmdpe'
name=
{
[
'config'
,
'kubernetesConfig'
,
'jmPodTemplate'
]
}
>
<
CodeEdit
<
CodeEdit
{
...
CodeEditProps
}
code=
{
value
.
config
?.
kubernetesConfig
?.
jmPodTemplate
??
''
}
/>
{
...
CodeEditProps
}
code=
{
value
.
config
?.
kubernetesConfig
?.
jmPodTemplate
??
''
}
/>
</
ProFormItem
>
</
ProFormItem
>
)
)
},
},
...
@@ -95,10 +89,7 @@ const FlinkK8s = (props: { type: string; value: any } & connect) => {
...
@@ -95,10 +89,7 @@ const FlinkK8s = (props: { type: string; value: any } & connect) => {
label
:
<
TagAlignCenter
>
TM Pod Template
</
TagAlignCenter
>,
label
:
<
TagAlignCenter
>
TM Pod Template
</
TagAlignCenter
>,
children
:
(
children
:
(
<
ProFormItem
key=
'tmdpe'
name=
{
[
'config'
,
'kubernetesConfig'
,
'tmPodTemplate'
]
}
>
<
ProFormItem
key=
'tmdpe'
name=
{
[
'config'
,
'kubernetesConfig'
,
'tmPodTemplate'
]
}
>
<
CodeEdit
<
CodeEdit
{
...
CodeEditProps
}
code=
{
value
.
config
?.
kubernetesConfig
?.
tmPodTemplate
??
''
}
/>
{
...
CodeEditProps
}
code=
{
value
.
config
?.
kubernetesConfig
?.
tmPodTemplate
??
''
}
/>
</
ProFormItem
>
</
ProFormItem
>
)
)
}
}
...
...
dinky-web/src/types/DevOps/data.d.ts
View file @
bb8b272d
...
@@ -71,6 +71,17 @@ declare namespace Jobs {
...
@@ -71,6 +71,17 @@ declare namespace Jobs {
clusterName
:
string
;
clusterName
:
string
;
};
};
export
type
VetricsMetrics
=
{
'read-bytes'
:
number
;
'read-bytes-complete'
:
boolean
;
'write-bytes'
:
number
;
'write-bytes-complete'
:
boolean
;
'read-records'
:
number
;
'read-records-complete'
:
boolean
;
'write-records'
:
number
;
'write-records-complete'
:
boolean
;
};
export
type
JobVertices
=
{
export
type
JobVertices
=
{
id
:
string
;
id
:
string
;
name
:
string
;
name
:
string
;
...
@@ -79,7 +90,7 @@ declare namespace Jobs {
...
@@ -79,7 +90,7 @@ declare namespace Jobs {
status
:
string
;
status
:
string
;
duration
:
number
;
duration
:
number
;
tasks
:
any
;
tasks
:
any
;
metrics
:
any
;
metrics
:
VetricsMetrics
;
};
};
export
type
Job
=
{
export
type
Job
=
{
...
@@ -94,8 +105,8 @@ declare namespace Jobs {
...
@@ -94,8 +105,8 @@ declare namespace Jobs {
now
:
number
;
now
:
number
;
timestamps
:
any
;
timestamps
:
any
;
vertices
:
JobVertices
[];
vertices
:
JobVertices
[];
'status-counts'
:
{}
;
'status-counts'
:
any
;
plan
:
{}
;
plan
:
any
;
};
};
export
type
JobDataDtoItem
=
{
export
type
JobDataDtoItem
=
{
id
:
number
;
id
:
number
;
...
...
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