@@ -5,13 +5,14 @@ import {
5
5
EditOutlined ,
6
6
InfoCircleOutlined ,
7
7
PlayCircleOutlined ,
8
+ StopOutlined ,
8
9
} from '@ant-design/icons' ;
9
10
import { Button , Empty , Popover , Tooltip } from 'antd' ;
10
11
11
12
import { USER_GUIDE } from 'const' ;
12
13
import { useActions } from 'hooks' ;
13
14
import isEqual from 'lodash/isEqual' ;
14
- import { deleteConfirmAction } from 'utils' ;
15
+ import { deleteConfirmAction , stopConfirmAction } from 'utils' ;
15
16
import PipelineCreateBoard from './TensorflowBoards/PipelineCreateBoard.react' ;
16
17
import usePath from './usePath' ;
17
18
@@ -23,7 +24,7 @@ const title = 'Create Tensor Board for selected Node';
23
24
24
25
const PipelineActions = ( { pipeline, className } ) => {
25
26
const { goTo } = usePath ( ) ;
26
- const { deleteStored : remove } = useActions ( ) ;
27
+ const { deleteStored : remove , stopAllPipeline } = useActions ( ) ;
27
28
28
29
const container = useRef ( ) ;
29
30
@@ -38,6 +39,11 @@ const PipelineActions = ({ pipeline, className }) => {
38
39
remove ,
39
40
] ) ;
40
41
42
+ const onStop = useCallback (
43
+ ( ) => stopConfirmAction ( stopAllPipeline , pipeline ) ,
44
+ [ pipeline , stopAllPipeline ]
45
+ ) ;
46
+
41
47
const setPopupContainer = useCallback ( ( ) => container . current , [ container ] ) ;
42
48
43
49
const onUpdate = useCallback ( ( ) => {
@@ -90,6 +96,9 @@ const PipelineActions = ({ pipeline, className }) => {
90
96
< Tooltip title = "delete pipeline" >
91
97
< Button icon = { < DeleteOutlined /> } onClick = { onDelete } />
92
98
</ Tooltip >
99
+ < Tooltip title = "stop all jobs of pipeline" >
100
+ < Button icon = { < StopOutlined /> } onClick = { onStop } />
101
+ </ Tooltip >
93
102
< Tooltip title = "show overview" >
94
103
< Button icon = { < InfoCircleOutlined /> } onClick = { onEdit } />
95
104
</ Tooltip >
0 commit comments