Skip to content

Commit 14feb25

Browse files
Merge branch '4.19' into 4.20
2 parents 742e131 + 1bfebd5 commit 14feb25

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

ui/src/components/header/ProjectMenu.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
<script>
3535
import InfiniteScrollSelect from '@/components/widgets/InfiniteScrollSelect'
36+
import eventBus from '@/config/eventBus'
3637
3738
export default {
3839
name: 'ProjectMenu',
@@ -42,7 +43,8 @@ export default {
4243
data () {
4344
return {
4445
selectedProjectId: null,
45-
loading: false
46+
loading: false,
47+
timestamp: new Date().getTime()
4648
}
4749
},
4850
created () {
@@ -59,7 +61,8 @@ export default {
5961
projectsApiParams () {
6062
return {
6163
details: 'min',
62-
listall: true
64+
listall: true,
65+
timestamp: this.timestamp
6366
}
6467
}
6568
},
@@ -70,6 +73,9 @@ export default {
7073
this.selectedProjectId = newId
7174
}
7275
)
76+
eventBus.on('projects-updated', (args) => {
77+
this.timestamp = new Date().getTime()
78+
})
7379
},
7480
beforeUnmount () {
7581
if (this.unwatchProject) {

ui/src/views/AutogenView.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,9 @@ export default {
13861386
if ('successMethod' in action) {
13871387
action.successMethod(this, result)
13881388
}
1389+
if (['createProject', 'updateProject', 'deleteProject'].includes(action.api)) {
1390+
eventBus.emit('projects-updated', { action: action.api, project: this.resource })
1391+
}
13891392
resolve(true)
13901393
},
13911394
errorMethod: () => {

0 commit comments

Comments
 (0)