Skip to content
Snippets Groups Projects
Commit e5e2e2a5 authored by Janis Streib's avatar Janis Streib :owl:
Browse files

ADD: offline indicator

parent 0d4ec958
No related branches found
No related tags found
No related merge requests found
......@@ -219,7 +219,9 @@ export default {
checkVersion() {
SystemInfoService.getAlerts().then((alerts) => {
this.$store.commit('updateSystemAlerts', alerts.data)
this.$store.commit('setOnline', true)
}).catch(() => {
this.$store.commit('setOnline', false)
}) // Fail silently
SystemInfoService.getMaintenance(this.$store.state).then((items) => {
const alerts = []
......
......@@ -8,6 +8,10 @@
src="/logo.webp"/>
<img v-else class="d-inline-block align-top scc-img" alt="NETTVS" src="@/assets/img/netvs_logo.png"/>
</b-navbar-brand>
<b-nav-text class="ml-3 text-danger" v-if="!$store.state.netvs_online">
<netvs-icon size="1x" class="pr-1 text-danger" :beat_fade="true" icon="offline"/>
{{ $t('system.offline') }}
</b-nav-text>
<template v-if="$store.state.impersonate_user">
<b-nav-text class="ml-3">
<netvs-icon size="1x" class="pr-1 text-danger" :beat_fade="true" icon="warning"/>
......
......@@ -14,6 +14,7 @@ export default {
data() {
return {
map: {
offline: 'fa-solid fa-link-slash',
home: 'fa-solid fa-home',
dnsvs: 'fa-solid fa-signs-post',
record: 'fa-solid fa-signs-post',
......
......@@ -423,6 +423,7 @@
}
},
"system": {
"offline": "NETVS Offline",
"OE": "OE",
"account": "Account",
"accounts_tokens": "Accounts & Tokens",
......
......@@ -420,6 +420,7 @@
}
},
"system": {
"offline": "NETVS Offline",
"OE": "OU",
"account": "Account",
"accounts_tokens": "Accounts & Tokens",
......
......@@ -32,6 +32,7 @@ function getTaListFromLocalStorage() {
const NetvsVuex = new Vuex.Store({
state: {
netvs_online: true,
current_api_version: null,
home_grid: window.localStorage.getItem('home_grid') ? JSON.parse(window.localStorage.getItem('home_grid')) : true,
refreshHandleGPK: null,
......@@ -219,6 +220,9 @@ const NetvsVuex = new Vuex.Store({
this.dispatch('refresh_session_info')
}
},
setOnline(state, payload) {
state.netvs_online = payload
},
update_session_info(state, payload) {
state.xup_perm = payload.xup_perm
state.user = payload.user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment