Fixing autogen reload on vm deploy

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
davidjumani 2020-08-26 17:03:22 +05:30 committed by Rohit Yadav
parent 8d3f7b9f1b
commit 8f6b8d774d
2 changed files with 8 additions and 4 deletions

View File

@ -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') {

View File

@ -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', {