@@ -5,13 +5,14 @@ import {
55 EditOutlined ,
66 InfoCircleOutlined ,
77 PlayCircleOutlined ,
8+ StopOutlined ,
89} from '@ant-design/icons' ;
910import { Button , Empty , Popover , Tooltip } from 'antd' ;
1011
1112import { USER_GUIDE } from 'const' ;
1213import { useActions } from 'hooks' ;
1314import isEqual from 'lodash/isEqual' ;
14- import { deleteConfirmAction } from 'utils' ;
15+ import { deleteConfirmAction , stopConfirmAction } from 'utils' ;
1516import PipelineCreateBoard from './TensorflowBoards/PipelineCreateBoard.react' ;
1617import usePath from './usePath' ;
1718
@@ -23,7 +24,7 @@ const title = 'Create Tensor Board for selected Node';
2324
2425const PipelineActions = ( { pipeline, className } ) => {
2526 const { goTo } = usePath ( ) ;
26- const { deleteStored : remove } = useActions ( ) ;
27+ const { deleteStored : remove , stopAllPipeline } = useActions ( ) ;
2728
2829 const container = useRef ( ) ;
2930
@@ -38,6 +39,11 @@ const PipelineActions = ({ pipeline, className }) => {
3839 remove ,
3940 ] ) ;
4041
42+ const onStop = useCallback (
43+ ( ) => stopConfirmAction ( stopAllPipeline , pipeline ) ,
44+ [ pipeline , stopAllPipeline ]
45+ ) ;
46+
4147 const setPopupContainer = useCallback ( ( ) => container . current , [ container ] ) ;
4248
4349 const onUpdate = useCallback ( ( ) => {
@@ -90,6 +96,9 @@ const PipelineActions = ({ pipeline, className }) => {
9096 < Tooltip title = "delete pipeline" >
9197 < Button icon = { < DeleteOutlined /> } onClick = { onDelete } />
9298 </ Tooltip >
99+ < Tooltip title = "stop all jobs of pipeline" >
100+ < Button icon = { < StopOutlined /> } onClick = { onStop } />
101+ </ Tooltip >
93102 < Tooltip title = "show overview" >
94103 < Button icon = { < InfoCircleOutlined /> } onClick = { onEdit } />
95104 </ Tooltip >
0 commit comments