From b80b6a903a22b9dc2dacfc058bef8425c9c664bd Mon Sep 17 00:00:00 2001 From: nicolas Date: Fri, 10 Sep 2021 12:11:47 -0300 Subject: [PATCH] Move eventBus listener to mounted --- ui/src/views/AutogenView.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 8b61858d0cb7..247ec0018c4f 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -418,6 +418,11 @@ export default { eventBus.$off('async-job-complete') eventBus.$off('exec-action') }, + mounted () { + eventBus.$on('exec-action', (action, isGroupAction) => { + this.execAction(action, isGroupAction) + }) + }, created () { eventBus.$on('vm-refresh-data', () => { if (this.$route.path === '/vm' || this.$route.path.includes('/vm/')) { @@ -427,9 +432,6 @@ export default { eventBus.$on('async-job-complete', (action) => { this.fetchData() }) - eventBus.$on('exec-action', (action, isGroupAction) => { - this.execAction(action, isGroupAction) - }) this.currentPath = this.$route.fullPath this.fetchData()