Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ui/src/components/header/ProjectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<script>
import InfiniteScrollSelect from '@/components/widgets/InfiniteScrollSelect'
import eventBus from '@/config/eventBus'

export default {
name: 'ProjectMenu',
Expand All @@ -42,7 +43,8 @@ export default {
data () {
return {
selectedProjectId: null,
loading: false
loading: false,
timestamp: new Date().getTime()
}
},
created () {
Expand All @@ -59,7 +61,8 @@ export default {
projectsApiParams () {
return {
details: 'min',
listall: true
listall: true,
timestamp: this.timestamp
}
}
},
Expand All @@ -70,6 +73,9 @@ export default {
this.selectedProjectId = newId
}
)
eventBus.on('projects-updated', (args) => {
this.timestamp = new Date().getTime()
})
},
beforeUnmount () {
if (this.unwatchProject) {
Expand Down
3 changes: 3 additions & 0 deletions ui/src/views/AutogenView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,9 @@ export default {
if ('successMethod' in action) {
action.successMethod(this, result)
}
if (['createProject', 'updateProject', 'deleteProject'].includes(action.api)) {
eventBus.emit('projects-updated', { action: action.api, project: this.resource })
}
resolve(true)
},
errorMethod: () => {
Expand Down
Loading