+ {{api}}
+ {{api1}}
import {EventBus} from '@/utils';
+ import { API_V1_URL, API_URL } from '@/main.ts'
export default {
data() {
@@ -48,6 +51,8 @@
email: '',
dismissSecs: 5,
dismissCountDown: 0,
+ api: API_URL,
+ api1: API_V1_URL,
};
},
@@ -95,7 +100,7 @@
},
access_token() {
return this.$store.state.access_token;
- },
+ }
},
};
diff --git a/src/main.ts b/src/main.ts
index b3a821c..64ca24a 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -120,15 +120,23 @@ localize('de', de);
Vue.component('ValidationObserver', ValidationObserver);
Vue.component('ValidationProvider', ValidationProvider);
+let baseDomain = "";
+let wsURL = "";
+
+if(process.env.NODE_ENV == "development"){
+ baseDomain = "http://localhost:5443";
+ wsURL = "ws://localhost:5443";
+}
+
//const API_URL = 'http://localhost:5443/api';
//const baseDomain = "http://localhost:5443";
-const baseDomain = "";
+
export const API_URL = `${baseDomain}/api`;
export const API_V1_URL = `${baseDomain}/api/v1`;
// const socket = io('ws://localhost:5000',{autoConnect: false, reconnectionAttempts: 3});
-const socket = io('ws://localhost:5443', {
+const socket = io(wsURL, {
autoConnect: false,
reconnectionAttempts: 3,
query: {jwt: store.state.access_token},
diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts
index fda3514..8a49cc5 100644
--- a/src/plugins/i18n.ts
+++ b/src/plugins/i18n.ts
@@ -89,6 +89,9 @@ const messages = {
model_name: 'Modellname',
created_at: 'Erstellt um',
last_time_modified: 'Letzter Änderungszeitpunkt',
+ Session_timeout_in: 'Session läuft ab in',
+ Session_expired: 'Session ist abgelaufen',
+ auto_renew_session: 'Session automatisch erneuern',
},
en: {
welcomeMsg: 'Welcome to Your Vue.js + TypeScript App',
@@ -163,6 +166,9 @@ const messages = {
requires_password: 'requires password',
ssh_port: 'SSH Port',
telnet_port: 'Telnet Port',
+ Session_timeout_in: 'Session will timeout in',
+ Session_expired: 'Session has expired',
+ auto_renew_session: 'auto renew session',
},
es: {
welcomeMsg: 'Bienvenido a tu aplicación Vue.js + TypeScript',
diff --git a/src/router.ts b/src/router.ts
index c9162e4..0e085ff 100644
--- a/src/router.ts
+++ b/src/router.ts
@@ -16,6 +16,7 @@ import Permission from '@/components/Admin/Permission.vue';
import Rooms from '@/components/Rooms.vue';
import Recorders from '@/components/Recorders.vue';
import Recorder from '@/components/Recorder.vue';
+import RecorderModel from '@/components/RecorderModel.vue';
import Commands from '@/components/Commands.vue';
import store from '@/store';
@@ -96,6 +97,11 @@ export const router = new Router({
name: 'recorder',
props: true,
component: Recorder,
+ }, {
+ path: '/recorder_model/:recorder_model_id?',
+ name: 'recorder_model',
+ props: true,
+ component: RecorderModel,
}, {
path: '/test',
name: 'test',
diff --git a/src/views/Home.vue b/src/views/Home.vue
index a4928c7..6331c16 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -51,6 +51,7 @@
}
mounted() {
+ console.log(process.env.NODE_ENV);
if (this.authenticated) {
if (this.profile == null || Object.keys(this.profile).length === 0) {
this.$parent.$data.isLoading = true;