mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Fix reload data after delete vm (#761)
* fix reload data after delete vm * fix call fetchData after pollJob success response Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
28b0477425
commit
432d0c19ad
@ -66,7 +66,7 @@ export const pollJobPlugin = {
|
||||
key: jobId,
|
||||
duration: 2
|
||||
})
|
||||
eventBus.$emit('async-job-complete')
|
||||
eventBus.$emit('async-job-complete', action)
|
||||
successMethod(result)
|
||||
} else if (result.jobstatus === 2) {
|
||||
message.error({
|
||||
@ -88,7 +88,7 @@ export const pollJobPlugin = {
|
||||
key: jobId,
|
||||
duration: 0
|
||||
})
|
||||
eventBus.$emit('async-job-complete')
|
||||
eventBus.$emit('async-job-complete', action)
|
||||
errorMethod(result)
|
||||
} else if (result.jobstatus === 0) {
|
||||
if (showLoading) {
|
||||
|
||||
@ -402,7 +402,12 @@ export default {
|
||||
this.fetchData()
|
||||
}
|
||||
})
|
||||
eventBus.$on('async-job-complete', () => {
|
||||
eventBus.$on('async-job-complete', (action) => {
|
||||
if (this.$route.path.includes('/vm/')) {
|
||||
if (action && 'api' in action && ['destroyVirtualMachine'].includes(action.api)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
this.fetchData()
|
||||
})
|
||||
eventBus.$on('exec-action', (action, isGroupAction) => {
|
||||
|
||||
@ -141,6 +141,9 @@ export default {
|
||||
} else {
|
||||
this.parentFetchData()
|
||||
}
|
||||
},
|
||||
action: {
|
||||
api: 'destroyVirtualMachine'
|
||||
}
|
||||
})
|
||||
this.closeAction()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user