summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-02-17 09:49:34 +0100
committerJo-Philipp Wich <jo@mein.io>2020-02-17 09:50:36 +0100
commit2cad20e7ea90c962020bb2f2463fb660271b84ea (patch)
treecce40ba6ff8cc7603fb650aa94ba70257759d1b9 /modules/luci-mod-status/htdocs
parent2fa9885e17fd75b39c38501f34f087b1373a7b74 (diff)
luci-mod-network, luci-mod-status: harmonize wifi signal indicators
Fixes: #3636 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-status/htdocs')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js
index e73f57712b..86468c7188 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js
@@ -139,14 +139,14 @@ return L.Class.extend({
ipv6 = hosthints.getIP6AddrByMACAddr(bss.mac);
var icon;
- var q = (-1 * (bss.noise - bss.signal)) / 5;
- if (q < 1)
+ var q = Math.min((bss.signal + 110) / 70 * 100, 100);
+ if (q == 0)
icon = L.resource('icons/signal-0.png');
- else if (q < 2)
+ else if (q < 25)
icon = L.resource('icons/signal-0-25.png');
- else if (q < 3)
+ else if (q < 50)
icon = L.resource('icons/signal-25-50.png');
- else if (q < 4)
+ else if (q < 75)
icon = L.resource('icons/signal-50-75.png');
else
icon = L.resource('icons/signal-75-100.png');