Skip to content

Commit

Permalink
Add polling for getOverview in toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashass committed Apr 27, 2020
1 parent 2ce2d63 commit 2f18e20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webui/src/components/_commons/ToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default {
name: 'ToolBar',
data () {
return {
loadingOverview: true
loadingOverview: true,
intervalRefresh: null,
intervalRefreshTime: 5000
}
},
computed: {
Expand Down Expand Up @@ -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')
}
}
Expand Down

0 comments on commit 2f18e20

Please sign in to comment.