From 240bef3f67511cefce00556ffb44cd214aae975b Mon Sep 17 00:00:00 2001 From: Jonathan Baecker Date: Thu, 16 Apr 2020 18:30:31 +0200 Subject: [PATCH] faster stat --- ffplayout/frontend/pages/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ffplayout/frontend/pages/index.vue b/ffplayout/frontend/pages/index.vue index 46aa23b4..fc42b69b 100644 --- a/ffplayout/frontend/pages/index.vue +++ b/ffplayout/frontend/pages/index.vue @@ -209,7 +209,10 @@ export default { } }, - sysStats () { + async sysStats () { + const response = await this.$axios.get('api/stats/?stats=all', { headers: { Authorization: 'Bearer ' + this.$store.state.auth.jwtToken }, progress: false }) + this.stat = response.data + this.interval = setInterval(async () => { await this.$store.dispatch('auth/inspectToken') const response = await this.$axios.get('api/stats/?stats=all', { headers: { Authorization: 'Bearer ' + this.$store.state.auth.jwtToken }, progress: false })