This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new efb1f2b719 UI: Fix templates page redirection after delete job is 
finished (#6345)
efb1f2b719 is described below

commit efb1f2b7199eae2c4c8072cc7be552490a0384f0
Author: Nicolas Vazquez <[email protected]>
AuthorDate: Tue May 3 13:59:47 2022 -0300

    UI: Fix templates page redirection after delete job is finished (#6345)
---
 ui/src/views/image/TemplateZones.vue | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ui/src/views/image/TemplateZones.vue 
b/ui/src/views/image/TemplateZones.vue
index ca83293a5d..29d2286ddf 100644
--- a/ui/src/views/image/TemplateZones.vue
+++ b/ui/src/views/image/TemplateZones.vue
@@ -453,10 +453,9 @@ export default {
           successMethod: result => {
             if (singleZone) {
               const isResourcePage = (this.$route.params && 
this.$route.params.id)
-              if (isResourcePage) {
-                if (this.selectedItems.length === 0 && 
!this.showGroupActionModal) {
-                  this.$router.push({ path: '/template' })
-                }
+              const isSameResource = isResourcePage && this.$route.params.id 
=== result.jobinstanceid
+              if (isResourcePage && isSameResource && 
this.selectedItems.length === 0 && !this.showGroupActionModal) {
+                this.$router.push({ path: '/template' })
               }
             } else {
               if (this.selectedItems.length === 0) {

Reply via email to