webapp: Implemented reload button for info views

This commit is contained in:
Thomas Basler 2023-03-31 20:05:06 +02:00
parent 9b74badda8
commit d03b8f6e5b
8 changed files with 24 additions and 8 deletions

View File

@ -2,8 +2,16 @@
<div :class="{'container-xxl': !isWideScreen, <div :class="{'container-xxl': !isWideScreen,
'container-fluid': isWideScreen}" role="main"> 'container-fluid': isWideScreen}" role="main">
<div class="page-header"> <div class="page-header">
<div class="row">
<div class="col-sm-11">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
</div> </div>
<div class="col-sm-1" v-if="showReload">
<button type="button" class="float-end btn btn-outline-primary"
@click="$emit('reload')" v-tooltip :title="$t('base.Reload')" ><BIconArrowClockwise /></button>
</div>
</div>
</div>
<div class="text-center" v-if="isLoading"> <div class="text-center" v-if="isLoading">
<div class="spinner-border" role="status"> <div class="spinner-border" role="status">
@ -19,12 +27,17 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { BIconArrowClockwise } from 'bootstrap-icons-vue';
export default defineComponent({ export default defineComponent({
components: {
BIconArrowClockwise,
},
props: { props: {
title: { type: String, required: true }, title: { type: String, required: true },
isLoading: { type: Boolean, required: false, default: false }, isLoading: { type: Boolean, required: false, default: false },
isWideScreen: { type: Boolean, required: false, default: false }, isWideScreen: { type: Boolean, required: false, default: false },
showReload: { type: Boolean, required: false, default: false },
}, },
}); });
</script> </script>

View File

@ -23,7 +23,8 @@
"Login": "Anmelden" "Login": "Anmelden"
}, },
"base": { "base": {
"Loading": "Lade..." "Loading": "Lade...",
"Reload": "Aktualisieren"
}, },
"localeswitcher": { "localeswitcher": {
"Dark": "Dunkel", "Dark": "Dunkel",

View File

@ -23,7 +23,8 @@
"Login": "Login" "Login": "Login"
}, },
"base": { "base": {
"Loading": "Loading..." "Loading": "Loading...",
"Reload": "Reload"
}, },
"localeswitcher": { "localeswitcher": {
"Dark": "Dark", "Dark": "Dark",

View File

@ -23,7 +23,8 @@
"Login": "Connexion" "Login": "Connexion"
}, },
"base": { "base": {
"Loading": "Chargement..." "Loading": "Chargement...",
"Reload": "Reload"
}, },
"localeswitcher": { "localeswitcher": {
"Dark": "Dark", "Dark": "Dark",

View File

@ -1,5 +1,5 @@
<template> <template>
<BasePage :title="$t('mqttinfo.MqttInformation')" :isLoading="dataLoading"> <BasePage :title="$t('mqttinfo.MqttInformation')" :isLoading="dataLoading" :show-reload="true" @reload="getMqttInfo">
<CardElement :text="$t('mqttinfo.ConfigurationSummary')" textVariant="text-bg-primary"> <CardElement :text="$t('mqttinfo.ConfigurationSummary')" textVariant="text-bg-primary">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover table-condensed"> <table class="table table-hover table-condensed">

View File

@ -1,5 +1,5 @@
<template> <template>
<BasePage :title="$t('networkinfo.NetworkInformation')" :isLoading="dataLoading"> <BasePage :title="$t('networkinfo.NetworkInformation')" :isLoading="dataLoading" :show-reload="true" @reload="getNetworkInfo">
<WifiStationInfo :networkStatus="networkDataList" /> <WifiStationInfo :networkStatus="networkDataList" />
<div class="mt-5"></div> <div class="mt-5"></div>
<WifiApInfo :networkStatus="networkDataList" /> <WifiApInfo :networkStatus="networkDataList" />

View File

@ -1,5 +1,5 @@
<template> <template>
<BasePage :title="$t('ntpinfo.NtpInformation')" :isLoading="dataLoading"> <BasePage :title="$t('ntpinfo.NtpInformation')" :isLoading="dataLoading" :show-reload="true" @reload="getNtpInfo">
<CardElement :text="$t('ntpinfo.ConfigurationSummary')" textVariant="text-bg-primary"> <CardElement :text="$t('ntpinfo.ConfigurationSummary')" textVariant="text-bg-primary">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover table-condensed"> <table class="table table-hover table-condensed">

View File

@ -1,5 +1,5 @@
<template> <template>
<BasePage :title="$t('systeminfo.SystemInfo')" :isLoading="dataLoading"> <BasePage :title="$t('systeminfo.SystemInfo')" :isLoading="dataLoading" :show-reload="true" @reload="getSystemInfo">
<FirmwareInfo :systemStatus="systemDataList" /> <FirmwareInfo :systemStatus="systemDataList" />
<div class="mt-5"></div> <div class="mt-5"></div>
<HardwareInfo :systemStatus="systemDataList" /> <HardwareInfo :systemStatus="systemDataList" />