summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-03-23 22:14:02 +0100
committerJo-Philipp Wich <jo@mein.io>2020-03-23 22:14:02 +0100
commit1b7e923cf6ca3da515104cd732de64c5312942dc (patch)
tree82afc457320f3b7d2230ce3f914a29edb87dbff3 /modules/luci-mod-network/htdocs/luci-static
parentbe62595c5b44e2f4bc366bb3a2d2ee07d69a77dd (diff)
luci-mod-network: adjust assoclist markup for easier styling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js32
1 files changed, 24 insertions, 8 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
index eaa0813548..767bab254d 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
@@ -65,8 +65,18 @@ function render_signal_badge(signalPercent, signalValue, noiseValue, wrap) {
title = _('Interface is disabled');
}
- return E('div', { 'class': wrap ? 'center' : 'ifacebadge', 'title': title },
- [ E('img', { 'src': icon }), wrap ? E('br') : ' ', value ]);
+ return E('div', {
+ 'class': wrap ? 'center' : 'ifacebadge',
+ 'title': title,
+ 'data-signal': signalValue,
+ 'data-noise': noiseValue
+ }, [
+ E('img', { 'src': icon }),
+ E('span', {}, [
+ wrap ? E('br') : ' ',
+ value
+ ])
+ ]);
}
function render_network_badge(radioNet) {
@@ -543,20 +553,26 @@ return L.view.extend({
var hint;
if (name && ipv4 && ipv6)
- hint = '%s (%s, %s)'.format(name, ipv4, ipv6);
+ hint = '%s <span class="hide-xs">(%s, %s)</span>'.format(name, ipv4, ipv6);
else if (name && (ipv4 || ipv6))
- hint = '%s (%s)'.format(name, ipv4 || ipv6);
+ hint = '%s <span class="hide-xs">(%s)</span>'.format(name, ipv4 || ipv6);
else
hint = name || ipv4 || ipv6 || '?';
var row = [
- E('span', { 'class': 'ifacebadge' }, [
+ E('span', {
+ 'class': 'ifacebadge',
+ 'data-ifname': bss.network.getIfname(),
+ 'data-ssid': bss.network.getSSID()
+ }, [
E('img', {
'src': L.resource('icons/wifi%s.png').format(bss.network.isUp() ? '' : '_disabled'),
'title': bss.radio.getI18n()
}),
- ' %s '.format(bss.network.getShortName()),
- E('small', '(%s)'.format(bss.network.getIfname()))
+ E('span', [
+ ' %s '.format(bss.network.getShortName()),
+ E('small', '(%s)'.format(bss.network.getIfname()))
+ ])
]),
bss.mac,
hint,
@@ -2143,7 +2159,7 @@ return L.view.extend({
.then(L.bind(this.poll_status, this, nodes));
}, this), 5);
- var table = E('div', { 'class': 'table', 'id': 'wifi_assoclist_table' }, [
+ var table = E('div', { 'class': 'table assoclist', 'id': 'wifi_assoclist_table' }, [
E('div', { 'class': 'tr table-titles' }, [
E('div', { 'class': 'th nowrap' }, _('Network')),
E('div', { 'class': 'th hide-xs' }, _('MAC-Address')),