davidjumani commented on a change in pull request #4782:
URL: https://github.com/apache/cloudstack/pull/4782#discussion_r670176766



##########
File path: ui/src/views/AutogenView.vue
##########
@@ -1044,15 +1051,17 @@ export default {
           args = [action.api, params]
         }
         api(...args).then(json => {
-          hasJobId = this.handleResponse(json, resourceName, action)
-          if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 
'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
-            this.$router.go(-1)
-          } else {
-            if (!hasJobId) {
-              this.fetchData()
+          this.handleResponse(json, resourceName, action).then(jobId => {
+            hasJobId = jobId
+            if ((action.icon === 'delete' || ['archiveEvents', 
'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && 
this.dataView) {
+              this.$router.go(-1)
+            } else {
+              if (!hasJobId) {
+                this.fetchData()
+              }
             }
-          }
-          this.closeAction()
+            this.closeAction()
+          })

Review comment:
       `this.closeAction()` needs to be out of the then clause else it prevents 
any form from closing unless the async job is completed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to