You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/10/05 11:47:07 UTC
[cloudstack-primate] branch master updated: Fix reload data after
delete vm (#761)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
The following commit(s) were added to refs/heads/master by this push:
new fad30a8 Fix reload data after delete vm (#761)
fad30a8 is described below
commit fad30a8c99c5b3b4c1b32438647a3d65767b2609
Author: Hoang Nguyen <ho...@unitech.vn>
AuthorDate: Mon Oct 5 18:46:57 2020 +0700
Fix reload data after delete vm (#761)
* fix reload data after delete vm
* fix call fetchData after pollJob success response
---
src/utils/plugins.js | 4 ++--
src/views/AutogenView.vue | 7 ++++++-
src/views/compute/DestroyVM.vue | 3 +++
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/utils/plugins.js b/src/utils/plugins.js
index 8647c31..b3a911c 100644
--- a/src/utils/plugins.js
+++ b/src/utils/plugins.js
@@ -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) {
diff --git a/src/views/AutogenView.vue b/src/views/AutogenView.vue
index f607ea5..c913fcd 100644
--- a/src/views/AutogenView.vue
+++ b/src/views/AutogenView.vue
@@ -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) => {
diff --git a/src/views/compute/DestroyVM.vue b/src/views/compute/DestroyVM.vue
index a20f614..b466bee 100644
--- a/src/views/compute/DestroyVM.vue
+++ b/src/views/compute/DestroyVM.vue
@@ -141,6 +141,9 @@ export default {
} else {
this.parentFetchData()
}
+ },
+ action: {
+ api: 'destroyVirtualMachine'
}
})
this.closeAction()