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',
|
name: 'ToolBar',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loadingOverview: true
|
loadingOverview: true,
|
||||||
|
intervalRefresh: null,
|
||||||
|
intervalRefreshTime: 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -65,8 +67,10 @@ export default {
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.refreshAll()
|
this.refreshAll()
|
||||||
|
this.intervalRefresh = setInterval(this.onGetAll, this.intervalRefreshTime)
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
|
clearInterval(this.intervalRefresh)
|
||||||
this.$store.commit('core/getOverviewClear')
|
this.$store.commit('core/getOverviewClear')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue