Add polling for getOverview in toolbar
This commit is contained in:
parent
2ce2d63bda
commit
2f18e20cb0
1 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,9 @@ export default {
|
|||
name: 'ToolBar',
|
||||
data () {
|
||||
return {
|
||||
loadingOverview: true
|
||||
loadingOverview: true,
|
||||
intervalRefresh: null,
|
||||
intervalRefreshTime: 5000
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -65,8 +67,10 @@ export default {
|
|||
},
|
||||
created () {
|
||||
this.refreshAll()
|
||||
this.intervalRefresh = setInterval(this.onGetAll, this.intervalRefreshTime)
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearInterval(this.intervalRefresh)
|
||||
this.$store.commit('core/getOverviewClear')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue