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/12 10:03:55 UTC

[cloudstack-primate] branch master updated: Close form after submission (#797)

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 e414511  Close form after submission (#797)
e414511 is described below

commit e414511677a005343d1305db896da942b879891a
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Mon Oct 12 15:33:45 2020 +0530

    Close form after submission (#797)
    
    Co-authored-by: Pearl Dsilva <pe...@shapeblue.com>
---
 src/locales/en.json             |  2 ++
 src/views/infra/MigrateData.vue | 20 ++++++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/locales/en.json b/src/locales/en.json
index aff571a..1fdbb35 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -1361,6 +1361,7 @@
 "label.migrate.volume.newdiskoffering.desc": "This option allows administrators to replace the old disk offering, using one that better suits the new placement of the volume.",
 "label.migrate.volume.to.primary.storage": "Migrate volume to another primary storage",
 "label.migrating": "Migrating",
+"label.migrating.data": "Migrating Data",
 "label.min.balance": "Min Balance",
 "label.min.past.hour": "min past the hr",
 "label.min_balance": "Min Balance",
@@ -2630,6 +2631,7 @@
 "message.datacenter.description": "Name of the datacenter on vCenter",
 "message.datastore.description": "Name of the datastore on vCenter",
 "message.data.migration": "Data Migration",
+"message.data.migration.progress": "Data Migration between image stores",
 "message.dedicate.zone": "Dedicating zone",
 "message.dedicated.zone.released": "Zone dedication released",
 "message.dedicating.cluster": "Dedicating Cluster...",
diff --git a/src/views/infra/MigrateData.vue b/src/views/infra/MigrateData.vue
index 784df09..56449d4 100644
--- a/src/views/infra/MigrateData.vue
+++ b/src/views/infra/MigrateData.vue
@@ -155,7 +155,11 @@ export default {
         }).catch(error => {
           console.log(error)
         })
-        this.loading = false
+        setTimeout(() => {
+          this.$message.loading({ content: this.$t('label.migrating.data'), duration: 1 })
+          this.loading = false
+          this.closeAction()
+        }, 200)
       })
     },
     migrateData (args, title) {
@@ -163,6 +167,13 @@ export default {
         api('migrateSecondaryStorageData', args).then(async json => {
           const jobId = json.migratesecondarystoragedataresponse.jobid
           if (jobId) {
+            this.$store.dispatch('AddAsyncJob', {
+              title: title,
+              jobid: jobId,
+              description: this.$t('message.data.migration.progress'),
+              status: 'progress',
+              silent: true
+            })
             const result = await this.pollJob(jobId, title)
             if (result.jobstatus === 2) {
               reject(result.jobresult.errortext)
@@ -183,13 +194,6 @@ export default {
             if (result.jobstatus === 0) {
               return
             }
-            this.$store.dispatch('AddAsyncJob', {
-              title: title,
-              jobid: jobId,
-              description: 'imagestore',
-              status: 'progress',
-              silent: true
-            })
             clearInterval(asyncJobInterval)
             resolve(result)
           })