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');
}
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.')))
])
]);
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 ]),
value: net.getActiveSSID() || '?'
},
- actived : {
+ isactive : {
title: _('Active'),
visible: true,
value: !net.isDisabled()
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';
},
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)),