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 3975992  migratewizard: Fix fetching jobid from api response (#913)
3975992 is described below

commit 3975992fd7b686cb4ee94ad59f8678acbac09a4a
Author: davidjumani <[email protected]>
AuthorDate: Fri Jan 8 17:42:19 2021 +0530

    migratewizard: Fix fetching jobid from api response (#913)
    
    * migratewizard: Display error and unfreeze form when api call fails
    
    * migratewizard: Fix fetching jobid from api response
---
 src/views/compute/MigrateWizard.vue | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/views/compute/MigrateWizard.vue 
b/src/views/compute/MigrateWizard.vue
index 4c558c1..87c4d63 100644
--- a/src/views/compute/MigrateWizard.vue
+++ b/src/views/compute/MigrateWizard.vue
@@ -153,14 +153,15 @@ export default {
         hostid: this.selectedHost.id,
         virtualmachineid: this.resource.id
       }).then(response => {
+        const jobid = this.selectedHost.requiresStorageMotion ? 
response.migratevirtualmachinewithvolumeresponse.jobid : 
response.migratevirtualmachineresponse.jobid
         this.$store.dispatch('AddAsyncJob', {
           title: `${this.$t('label.migrating')} ${this.resource.name}`,
-          jobid: response.migratevirtualmachineresponse.jobid,
+          jobid: jobid,
           description: this.resource.name,
           status: 'progress'
         })
         this.$pollJob({
-          jobId: response.migratevirtualmachineresponse.jobid,
+          jobId: jobid,
           successMessage: `${this.$t('message.success.migrating')} 
${this.resource.name}`,
           successMethod: () => {
             this.$parent.$parent.close()

Reply via email to