File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export const pollJobPlugin = {
6666 key : jobId ,
6767 duration : 2
6868 } )
69- eventBus . $emit ( 'async-job-complete' )
69+ eventBus . $emit ( 'async-job-complete' , action )
7070 successMethod ( result )
7171 } else if ( result . jobstatus === 2 ) {
7272 message . error ( {
@@ -88,7 +88,7 @@ export const pollJobPlugin = {
8888 key : jobId ,
8989 duration : 0
9090 } )
91- eventBus . $emit ( 'async-job-complete' )
91+ eventBus . $emit ( 'async-job-complete' , action )
9292 errorMethod ( result )
9393 } else if ( result . jobstatus === 0 ) {
9494 if ( showLoading ) {
Original file line number Diff line number Diff line change @@ -402,7 +402,12 @@ export default {
402402 this .fetchData ()
403403 }
404404 })
405- eventBus .$on (' async-job-complete' , () => {
405+ eventBus .$on (' async-job-complete' , (action ) => {
406+ if (this .$route .path .includes (' /vm/' )) {
407+ if (action && ' api' in action && [' destroyVirtualMachine' ].includes (action .api )) {
408+ return
409+ }
410+ }
406411 this .fetchData ()
407412 })
408413 eventBus .$on (' exec-action' , (action , isGroupAction ) => {
Original file line number Diff line number Diff line change @@ -141,6 +141,9 @@ export default {
141141 } else {
142142 this .parentFetchData ()
143143 }
144+ },
145+ action: {
146+ api: ' destroyVirtualMachine'
144147 }
145148 })
146149 this .closeAction ()
You can’t perform that action at this time.
0 commit comments