added rooms and recorders to fe

This commit is contained in:
2019-04-24 16:35:36 +02:00
parent 4a97efce6f
commit a9c07b628d
10 changed files with 576 additions and 411 deletions

View File

@@ -1,6 +1,10 @@
<template>
<div id="app">
<sync-loader :loading="isLoading"></sync-loader>
<b-alert v-model="showAlert" variant="danger" dismissible>
{{alertMessage}}
</b-alert>
<div id="nav">
<router-link to="/">Home</router-link>
|
@@ -41,7 +45,7 @@
</template>
<script>
import {getRemainingJwtValiditySeconds} from '@/utils';
import {EventBus, getRemainingJwtValiditySeconds} from '@/utils';
import SyncLoader from 'vue-spinner/src/SyncLoader.vue';
export default {
@@ -53,12 +57,24 @@
isLoading: false,
tokenValidity: -1,
refreshTokenValidity: -1,
showAlert: true,
alertMessage: "NO MESSAGE PROVIDED",
};
},
methods: {
// todo ...
showErrorMessage(msg) {
this.isLoading = false;
this.showAlert = true;
this.alertMessage = msg;
},
},
mounted() {
EventBus.$on('failedLoadingRecorders', (msg) => {
this.showErrorMessage(msg);
});
EventBus.$on('failedLoadingRooms', (msg) => {
this.showErrorMessage(msg);
});
this.$nextTick(() => {
window.setInterval(() => {
// this.$log.debug(getRemainingJwtValiditySeconds(this.$store.state.access_token));