Skip to content

Commit 4147d5a

Browse files
authored
ui: Move eventBus listener to mounted (apache#5435)
This PR fixes the action buttons for IP addresses, needed a refresh before the fix
1 parent c6055a2 commit 4147d5a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/src/views/AutogenView.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ export default {
418418
eventBus.$off('async-job-complete')
419419
eventBus.$off('exec-action')
420420
},
421+
mounted () {
422+
eventBus.$on('exec-action', (action, isGroupAction) => {
423+
this.execAction(action, isGroupAction)
424+
})
425+
},
421426
created () {
422427
eventBus.$on('vm-refresh-data', () => {
423428
if (this.$route.path === '/vm' || this.$route.path.includes('/vm/')) {
@@ -427,9 +432,6 @@ export default {
427432
eventBus.$on('async-job-complete', (action) => {
428433
this.fetchData()
429434
})
430-
eventBus.$on('exec-action', (action, isGroupAction) => {
431-
this.execAction(action, isGroupAction)
432-
})
433435
434436
this.currentPath = this.$route.fullPath
435437
this.fetchData()

0 commit comments

Comments
 (0)