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/09/28 10:49:26 UTC

[cloudstack-primate] branch master updated: compute: Back to list VM when deleting VM with the Expunge option. (#755)

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 6207206  compute: Back to list VM when deleting VM with the Expunge option. (#755)
6207206 is described below

commit 62072066bd454ae47da6e1c582989635839c6121
Author: Hoang Nguyen <ho...@unitech.vn>
AuthorDate: Mon Sep 28 17:49:17 2020 +0700

    compute: Back to list VM when deleting VM with the Expunge option. (#755)
    
    * compute: back to list VM when deleting VM with the Expunge option.
    
    * fixes: go back if is a detail view
    
    * fix go back only vm detail view
---
 src/views/compute/DestroyVM.vue | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/views/compute/DestroyVM.vue b/src/views/compute/DestroyVM.vue
index 518204b..a20f614 100644
--- a/src/views/compute/DestroyVM.vue
+++ b/src/views/compute/DestroyVM.vue
@@ -134,9 +134,15 @@ export default {
             jobId,
             loadingMessage: `${this.$t('message.deleting.vm')} ${this.resource.name}`,
             catchMessage: this.$t('error.fetching.async.job.result'),
-            successMessage: `${this.$t('message.success.delete.vm')} ${this.resource.name}`
+            successMessage: `${this.$t('message.success.delete.vm')} ${this.resource.name}`,
+            successMethod: () => {
+              if (this.$route.path.includes('/vm/') && values.expunge) {
+                this.$router.go(-1)
+              } else {
+                this.parentFetchData()
+              }
+            }
           })
-          this.parentFetchData()
           this.closeAction()
         }).catch(error => {
           this.$notifyError(error)