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>
|
|
|
|
|
<InterfaceStationInfo v-bind="networkDataList" />
|
|
|
|
|
<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-04-13 22:43:26 +02:00
|
|
|
import WifiStationInfo from "./partials/WifiStationInfo.vue";
|
2022-04-13 22:59:24 +02:00
|
|
|
import WifiApInfo from "./partials/WifiApInfo.vue";
|
|
|
|
|
import InterfaceStationInfo from "./partials/InterfaceStationInfo.vue";
|
|
|
|
|
import InterfaceApInfo from "./partials/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,
|
|
|
|
|
InterfaceStationInfo,
|
|
|
|
|
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,
|
|
|
|
|
// InterfaceStationInfo
|
|
|
|
|
sta_ip: "",
|
|
|
|
|
sta_netmask: "",
|
|
|
|
|
sta_gateway: "",
|
|
|
|
|
sta_dns1: "",
|
|
|
|
|
sta_dns2: "",
|
|
|
|
|
sta_mac: "",
|
|
|
|
|
// 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>
|