From 0c7078febdb10dd551f533f52ac642bfe53acd1d Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 13 Apr 2022 22:59:24 +0200 Subject: [PATCH] webapp: Code cleanup --- webapp/src/components/NetworkInfoView.vue | 6 +++--- .../src/components/partials/InterfaceApInfo.vue | 17 ++--------------- .../partials/InterfaceStationInfo.vue | 17 ++--------------- webapp/src/components/partials/WifiApInfo.vue | 17 ++--------------- .../src/components/partials/WifiStationInfo.vue | 4 ++-- 5 files changed, 11 insertions(+), 50 deletions(-) diff --git a/webapp/src/components/NetworkInfoView.vue b/webapp/src/components/NetworkInfoView.vue index d2165c0..863c2a7 100644 --- a/webapp/src/components/NetworkInfoView.vue +++ b/webapp/src/components/NetworkInfoView.vue @@ -14,9 +14,9 @@ diff --git a/webapp/src/components/partials/InterfaceStationInfo.vue b/webapp/src/components/partials/InterfaceStationInfo.vue index 09398d0..3f16426 100644 --- a/webapp/src/components/partials/InterfaceStationInfo.vue +++ b/webapp/src/components/partials/InterfaceStationInfo.vue @@ -5,8 +5,8 @@
- - +
+ @@ -54,19 +54,6 @@ export default { .then((response) => response.json()) .then((data) => (this.networkDataList = data)); }, - getRSSIasQuality(rssi) { - var quality = 0; - - if (rssi <= -100) { - quality = 0; - } else if (rssi >= -50) { - quality = 100; - } else { - quality = 2 * (rssi + 100); - } - - return quality; - }, }, }; diff --git a/webapp/src/components/partials/WifiApInfo.vue b/webapp/src/components/partials/WifiApInfo.vue index b6d4490..b7af381 100644 --- a/webapp/src/components/partials/WifiApInfo.vue +++ b/webapp/src/components/partials/WifiApInfo.vue @@ -5,8 +5,8 @@
-
IP Address {{ networkDataList.sta_ip }}
- +
+
Status response.json()) .then((data) => (this.networkDataList = data)); }, - getRSSIasQuality(rssi) { - var quality = 0; - - if (rssi <= -100) { - quality = 0; - } else if (rssi >= -50) { - quality = 100; - } else { - quality = 2 * (rssi + 100); - } - - return quality; - }, }, }; diff --git a/webapp/src/components/partials/WifiStationInfo.vue b/webapp/src/components/partials/WifiStationInfo.vue index 5c6c507..112ad8b 100644 --- a/webapp/src/components/partials/WifiStationInfo.vue +++ b/webapp/src/components/partials/WifiStationInfo.vue @@ -5,8 +5,8 @@
- - +
+
Status