summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-dashboard/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorPaul Donald <newtwen+github@gmail.com>2024-10-07 17:10:57 +0200
committerPaul Donald <newtwen+github@gmail.com>2024-10-07 17:10:57 +0200
commit723eb386340c8da681aa2c5fb60101690b3231fc (patch)
tree3da700ec3d934432508d4de2f5c32a11372d25d6 /modules/luci-mod-dashboard/htdocs/luci-static/resources
parentfeecad6e574b962631bf076454f0f7902b2ba3c1 (diff)
luci-mod-dashboard: Minor repairs
Strength gauge is now displayed. Appended dBm measurement also. Corrected some labels. Closes #6147 Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'modules/luci-mod-dashboard/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js26
1 files changed, 14 insertions, 12 deletions
diff --git a/modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js b/modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js
index 318c3abf87..e2742dd020 100644
--- a/modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js
+++ b/modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js
@@ -60,7 +60,7 @@ return baseclass.extend({
continue;
}
- if ('actived' === idx) {
+ if ('isactive' === idx) {
classname = radio[idx].value ? 'label label-success' : 'label label-danger';
radio[idx].value = radio[idx].value ? _('yes') : _('no');
}
@@ -81,9 +81,9 @@ return baseclass.extend({
var container_devices = E('table', { 'class': 'table assoclist devices-info' }, [
E('tr', { 'class': 'tr table-titles dashboard-bg' }, [
E('th', { 'class': 'th nowrap' }, _('Hostname')),
- E('th', { 'class': 'th' }, _('Wireless')),
- E('th', { 'class': 'th' }, _('Signal')),
- E('th', { 'class': 'th' }, '%s / %s'.format( _('Up.'), _('Down.')))
+ E('th', { 'class': 'th' }, _('SSID')),
+ E('th', { 'class': 'th', 'width': '45%' }, _('Signal Strength')),
+ E('th', { 'class': 'th' }, 'Transferred %s / %s'.format( _('Up.'), _('Down.')))
])
]);
@@ -104,11 +104,11 @@ return baseclass.extend({
if ('progress' == idx) {
container_content = E('div', { 'class' : 'td device-info' }, [
- E('div', { 'class': 'progress' }, [
- E('div', { 'class': 'progress-bar ' + device[idx].value.style, role: 'progressbar', style: 'width:'+device[idx].value.qualite+'%', 'aria-valuenow': device[idx].value.qualite, 'aria-valuemin': 0, 'aria-valuemax': 100 }),
+ E('div', { 'class': 'cbi-progressbar', 'title': 'RSSI: ' + parseInt(device[idx].value.qualite) + '% (' + device[idx].value.rssi + 'dBm)' }, [
+ E('div', { 'style': 'width: '+device[idx].value.qualite+'%'}),
])
]);
- } else if ('rate' == idx) {
+ } else if ('transferred' == idx) {
container_content = E('td', { 'class': 'td device-info' }, [
E('p', {}, [
E('span', { 'class': ''}, [ device[idx].value.rx ]),
@@ -159,7 +159,7 @@ return baseclass.extend({
value: net.getActiveSSID() || '?'
},
- actived : {
+ isactive : {
title: _('Active'),
visible: true,
value: !net.isDisabled()
@@ -205,7 +205,8 @@ return baseclass.extend({
name = hosthints.getHostnameByMACAddr(bss.mac);
var progress_style;
- var q = Math.min((bss.signal + 110) / 70 * 100, 100);
+ // var q = Math.min((bss.signal + 110) / 70 * 100, 100);
+ var q = 100 * ((bss.signal - bss.noise) / (-30 - bss.noise));
if (q == 0 || q < 25)
progress_style = 'bg-danger';
@@ -231,16 +232,17 @@ return baseclass.extend({
},
progress : {
- title: _('Channel'),
+ title: _('Strength'),
visible: true,
value: {
qualite: q,
+ rssi: bss.signal,
style: progress_style
}
},
- rate : {
- title: _('Bitrate'),
+ transferred : {
+ title: _('Transferred'),
visible: true,
value: {
rx: '%s'.format('%.2mB'.format(bss.rx.bytes)),