This is an automated email from the ASF dual-hosted git repository.
andrijapanic 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 c4e6017 Fixing autogen reload on vm deploy
new 9babf49 Merge pull request #623 from shapeblue/fix-refresh
c4e6017 is described below
commit c4e60172cf5d5458f11bf4e3de52c54e292d25e3
Author: davidjumani <[email protected]>
AuthorDate: Wed Aug 26 17:03:22 2020 +0530
Fixing autogen reload on vm deploy
---
src/views/AutogenView.vue | 6 +++++-
src/views/compute/DeployVM.vue | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/views/AutogenView.vue b/src/views/AutogenView.vue
index 8b79ef3..d147406 100644
--- a/src/views/AutogenView.vue
+++ b/src/views/AutogenView.vue
@@ -390,7 +390,11 @@ export default {
this.form = this.$form.createForm(this)
},
created () {
- eventBus.$on('refresh-data', this.fetchData)
+ eventBus.$on('vm-refresh-data', () => {
+ if (this.$route.path === '/vm' || this.$route.path.includes('/vm/')) {
+ this.fetchData()
+ }
+ })
},
mounted () {
if (this.device === 'desktop') {
diff --git a/src/views/compute/DeployVM.vue b/src/views/compute/DeployVM.vue
index 35ea64c..3dfc834 100644
--- a/src/views/compute/DeployVM.vue
+++ b/src/views/compute/DeployVM.vue
@@ -1384,15 +1384,15 @@ export default {
duration: 0
})
}
- eventBus.$emit('refresh-data')
+ eventBus.$emit('vm-refresh-data')
},
errorMethod: () => {
- eventBus.$emit('refresh-data')
+ eventBus.$emit('vm-refresh-data')
},
loadingMessage: `${title} ${this.$t('label.in.progress')}`,
catchMessage: this.$t('error.fetching.async.job.result'),
catchMethod: () => {
- eventBus.$emit('refresh-data')
+ eventBus.$emit('vm-refresh-data')
}
})
this.$store.dispatch('AddAsyncJob', {