2022-04-13 22:43:26 +02:00
|
|
|
<template>
|
2022-12-01 21:35:46 +01:00
|
|
|
<BasePage :title="$t('networkinfo.NetworkInformation')" :isLoading="dataLoading">
|
2022-10-18 18:25:50 +02:00
|
|
|
<WifiStationInfo :networkStatus="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
<WifiApInfo :networkStatus="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
<InterfaceNetworkInfo :networkStatus="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
<InterfaceApInfo :networkStatus="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
</BasePage>
|
2022-04-13 22:43:26 +02:00
|
|
|
</template>
|
|
|
|
|
|
2022-06-22 00:06:35 +02:00
|
|
|
<script lang="ts">
|
2022-10-18 18:25:50 +02:00
|
|
|
import BasePage from '@/components/BasePage.vue';
|
2022-10-17 18:23:28 +02:00
|
|
|
import InterfaceApInfo from "@/components/InterfaceApInfo.vue";
|
2022-12-24 20:35:30 +01:00
|
|
|
import InterfaceNetworkInfo from "@/components/InterfaceNetworkInfo.vue";
|
|
|
|
|
import WifiApInfo from "@/components/WifiApInfo.vue";
|
|
|
|
|
import WifiStationInfo from "@/components/WifiStationInfo.vue";
|
2022-10-17 20:43:27 +02:00
|
|
|
import type { NetworkStatus } from '@/types/NetworkStatus';
|
2022-12-24 20:35:30 +01:00
|
|
|
import { authHeader, handleResponse } from '@/utils/authentication';
|
|
|
|
|
import { defineComponent } from 'vue';
|
2022-04-13 22:43:26 +02:00
|
|
|
|
2022-06-21 20:27:03 +02:00
|
|
|
export default defineComponent({
|
2022-06-21 20:32:43 +02:00
|
|
|
components: {
|
2022-10-18 18:25:50 +02:00
|
|
|
BasePage,
|
2022-06-21 20:32:43 +02:00
|
|
|
WifiStationInfo,
|
|
|
|
|
WifiApInfo,
|
2022-07-20 19:21:31 +02:00
|
|
|
InterfaceNetworkInfo,
|
2022-06-21 20:32:43 +02:00
|
|
|
InterfaceApInfo,
|
|
|
|
|
},
|
2022-07-04 16:20:28 +02:00
|
|
|
data() {
|
|
|
|
|
return {
|
2022-07-12 20:56:30 +02:00
|
|
|
dataLoading: true,
|
2022-10-17 20:43:27 +02:00
|
|
|
networkDataList: {} as NetworkStatus,
|
2022-07-04 16:20:28 +02:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getNetworkInfo();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getNetworkInfo() {
|
2022-07-12 20:56:30 +02:00
|
|
|
this.dataLoading = true;
|
2022-11-22 20:37:01 +01:00
|
|
|
fetch("/api/network/status", { headers: authHeader() })
|
|
|
|
|
.then((response) => handleResponse(response, this.$emitter, this.$router))
|
2022-07-12 20:56:30 +02:00
|
|
|
.then((data) => {
|
|
|
|
|
this.networkDataList = data;
|
|
|
|
|
this.dataLoading = false;
|
|
|
|
|
});
|
2022-07-04 16:20:28 +02:00
|
|
|
},
|
|
|
|
|
},
|
2022-06-21 20:27:03 +02:00
|
|
|
});
|
2022-04-13 22:43:26 +02:00
|
|
|
</script>
|