2022-04-13 22:43:26 +02:00
|
|
|
<template>
|
2022-07-05 00:38:50 +02:00
|
|
|
<div class="container-xxl" role="main">
|
2022-06-21 20:32:43 +02:00
|
|
|
<div class="page-header">
|
|
|
|
|
<h1>Network Info</h1>
|
|
|
|
|
</div>
|
2022-07-12 20:56:30 +02:00
|
|
|
<div class="text-center" v-if="dataLoading">
|
|
|
|
|
<div class="spinner-border" role="status">
|
|
|
|
|
<span class="visually-hidden">Loading...</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<template v-if="!dataLoading">
|
|
|
|
|
<WifiStationInfo v-bind="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
<WifiApInfo v-bind="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
2022-07-20 19:21:31 +02:00
|
|
|
<InterfaceNetworkInfo v-bind="networkDataList" />
|
2022-07-12 20:56:30 +02:00
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
<InterfaceApInfo v-bind="networkDataList" />
|
|
|
|
|
<div class="mt-5"></div>
|
|
|
|
|
</template>
|
2022-04-13 22:43:26 +02:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2022-06-22 00:06:35 +02:00
|
|
|
<script lang="ts">
|
2022-06-21 20:27:03 +02:00
|
|
|
import { defineComponent } from 'vue';
|
2022-10-17 18:23:28 +02:00
|
|
|
import WifiStationInfo from "@/components/WifiStationInfo.vue";
|
|
|
|
|
import WifiApInfo from "@/components/WifiApInfo.vue";
|
|
|
|
|
import InterfaceNetworkInfo from "@/components/InterfaceNetworkInfo.vue";
|
|
|
|
|
import InterfaceApInfo from "@/components/InterfaceApInfo.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: {
|
|
|
|
|
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-07-04 16:20:28 +02:00
|
|
|
networkDataList: {
|
|
|
|
|
// WifiStationInfo
|
|
|
|
|
sta_status: false,
|
|
|
|
|
sta_ssid: "",
|
|
|
|
|
sta_rssi: 0,
|
|
|
|
|
// WifiApInfo
|
|
|
|
|
ap_status: false,
|
|
|
|
|
ap_ssid: "",
|
|
|
|
|
ap_stationnum: 0,
|
2022-07-20 19:21:31 +02:00
|
|
|
// InterfaceNetworkInfo
|
2022-09-06 18:45:32 +02:00
|
|
|
network_hostname: "",
|
2022-07-20 19:21:31 +02:00
|
|
|
network_ip: "",
|
|
|
|
|
network_netmask: "",
|
|
|
|
|
network_gateway: "",
|
|
|
|
|
network_dns1: "",
|
|
|
|
|
network_dns2: "",
|
|
|
|
|
network_mac: "",
|
|
|
|
|
network_mode: "",
|
2022-07-04 16:20:28 +02:00
|
|
|
// InterfaceApInfo
|
|
|
|
|
ap_ip: "",
|
|
|
|
|
ap_mac: "",
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getNetworkInfo();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getNetworkInfo() {
|
2022-07-12 20:56:30 +02:00
|
|
|
this.dataLoading = true;
|
2022-07-04 16:20:28 +02:00
|
|
|
fetch("/api/network/status")
|
|
|
|
|
.then((response) => response.json())
|
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>
|