From 179fb76abcb473841bd568bb5773ab908fa19464 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 3 Dec 2020 11:26:41 +0100 Subject: [PATCH] Update luci-mod-network from upstream --- luci-mod-network/Makefile | 2 +- .../resources/view/network/dhcp.js | 32 +++++++------- .../resources/view/network/diagnostics.js | 10 ++--- .../resources/view/network/wireless.js | 42 +++++++++++-------- 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/luci-mod-network/Makefile b/luci-mod-network/Makefile index 7a043dc40..71e847f31 100644 --- a/luci-mod-network/Makefile +++ b/luci-mod-network/Makefile @@ -4,7 +4,7 @@ # # This is free software, licensed under the Apache License, Version 2.0 . # -# From https://github.com/openwrt/luci/commit/83c912716e482000e92443cffc3202726314f480 +# From https://github.com/openwrt/luci/commit/f5c04e1a2e173f536597f220db0380cc08869e8e include $(TOPDIR)/rules.mk diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 95abeb6d0..d3f564d47 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -31,15 +31,15 @@ CBILeaseStatus = form.DummyValue.extend({ renderWidget: function(section_id, option_id, cfgvalue) { return E([ E('h4', _('Active DHCP Leases')), - E('div', { 'id': 'lease_status_table', 'class': 'table' }, [ - E('div', { 'class': 'tr table-titles' }, [ - E('div', { 'class': 'th' }, _('Hostname')), - E('div', { 'class': 'th' }, _('IPv4-Address')), - E('div', { 'class': 'th' }, _('MAC-Address')), - E('div', { 'class': 'th' }, _('Lease time remaining')) + E('table', { 'id': 'lease_status_table', 'class': 'table' }, [ + E('tr', { 'class': 'tr table-titles' }, [ + E('th', { 'class': 'th' }, _('Hostname')), + E('th', { 'class': 'th' }, _('IPv4-Address')), + E('th', { 'class': 'th' }, _('MAC-Address')), + E('th', { 'class': 'th' }, _('Lease time remaining')) ]), - E('div', { 'class': 'tr placeholder' }, [ - E('div', { 'class': 'td' }, E('em', _('Collecting data...'))) + E('tr', { 'class': 'tr placeholder' }, [ + E('td', { 'class': 'td' }, E('em', _('Collecting data...'))) ]) ]) ]); @@ -50,15 +50,15 @@ CBILease6Status = form.DummyValue.extend({ renderWidget: function(section_id, option_id, cfgvalue) { return E([ E('h4', _('Active DHCPv6 Leases')), - E('div', { 'id': 'lease6_status_table', 'class': 'table' }, [ - E('div', { 'class': 'tr table-titles' }, [ - E('div', { 'class': 'th' }, _('Host')), - E('div', { 'class': 'th' }, _('IPv6-Address')), - E('div', { 'class': 'th' }, _('DUID')), - E('div', { 'class': 'th' }, _('Lease time remaining')) + E('table', { 'id': 'lease6_status_table', 'class': 'table' }, [ + E('tr', { 'class': 'tr table-titles' }, [ + E('th', { 'class': 'th' }, _('Host')), + E('th', { 'class': 'th' }, _('IPv6-Address')), + E('th', { 'class': 'th' }, _('DUID')), + E('th', { 'class': 'th' }, _('Lease time remaining')) ]), - E('div', { 'class': 'tr placeholder' }, [ - E('div', { 'class': 'td' }, E('em', _('Collecting data...'))) + E('tr', { 'class': 'tr placeholder' }, [ + E('td', { 'class': 'td' }, E('em', _('Collecting data...'))) ]) ]) ]); diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js b/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js index 1855ee642..5d6bd4765 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js @@ -66,9 +66,9 @@ return view.extend({ return E([], [ E('h2', {}, [ _('Network Utilities') ]), - E('div', { 'class': 'table' }, [ - E('div', { 'class': 'tr' }, [ - E('div', { 'class': 'td left' }, [ + E('table', { 'class': 'table' }, [ + E('tr', { 'class': 'tr' }, [ + E('td', { 'class': 'td left' }, [ E('input', { 'style': 'margin:5px 0', 'type': 'text', @@ -91,7 +91,7 @@ return view.extend({ ]) ]), - E('div', { 'class': 'td left' }, [ + E('td', { 'class': 'td left' }, [ E('input', { 'style': 'margin:5px 0', 'type': 'text', @@ -114,7 +114,7 @@ return view.extend({ ]) ]), - E('div', { 'class': 'td left' }, [ + E('td', { 'class': 'td left' }, [ E('input', { 'style': 'margin:5px 0', 'type': 'text', diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index bb9877217..d19b025e3 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -649,7 +649,7 @@ return view.extend({ if (bss.network.isClientDisconnectSupported()) { if (table.firstElementChild.childNodes.length < 6) - table.firstElementChild.appendChild(E('div', { 'class': 'th cbi-section-actions'})); + table.firstElementChild.appendChild(E('th', { 'class': 'th cbi-section-actions'})); row.push(E('button', { 'class': 'cbi-button cbi-button-remove', @@ -850,7 +850,7 @@ return view.extend({ ]; } - return E('div', { 'class': 'td middle cbi-section-actions' }, E('div', btns)); + return E('td', { 'class': 'td middle cbi-section-actions' }, E('div', btns)); }; s.addModalOptions = function(s) { @@ -889,6 +889,12 @@ return view.extend({ o = ss.taboption('advanced', CBIWifiCountryValue, 'country', _('Country Code')); o.wifiNetwork = radioNet; + o = ss.taboption('advanced', form.ListValue, 'cell_density', _('Coverage cell density'), _('Configures data rates based on the coverage cell density. Normal configures basic rates to 6, 12, 24 Mbps if legacy 802.11b rates are not used else to 5.5, 11 Mbps. High configures basic rates to 12, 24 Mbps if legacy 802.11b rates are not used else to the 11 Mbps rate. Very High configures 24 Mbps as the basic rate. Supported rates lower than the minimum basic rate are not offered.')); + o.value('0', _('Disabled')); + o.value('1', _('Normal')); + o.value('2', _('High')); + o.value('3', _('Very High')); + o = ss.taboption('advanced', form.Flag, 'legacy_rates', _('Allow legacy 802.11b rates')); o.default = o.enabled; @@ -1656,15 +1662,15 @@ return view.extend({ }; s.handleScan = function(radioDev, ev) { - var table = E('div', { 'class': 'table' }, [ - E('div', { 'class': 'tr table-titles' }, [ - E('div', { 'class': 'th col-2 middle center' }, _('Signal')), - E('div', { 'class': 'th col-4 middle left' }, _('SSID')), - E('div', { 'class': 'th col-2 middle center hide-xs' }, _('Channel')), - E('div', { 'class': 'th col-2 middle left hide-xs' }, _('Mode')), - E('div', { 'class': 'th col-3 middle left hide-xs' }, _('BSSID')), - E('div', { 'class': 'th col-3 middle left' }, _('Encryption')), - E('div', { 'class': 'th cbi-section-actions right' }, ' '), + var table = E('table', { 'class': 'table' }, [ + E('tr', { 'class': 'tr table-titles' }, [ + E('th', { 'class': 'th col-2 middle center' }, _('Signal')), + E('th', { 'class': 'th col-4 middle left' }, _('SSID')), + E('th', { 'class': 'th col-2 middle center hide-xs' }, _('Channel')), + E('th', { 'class': 'th col-2 middle left hide-xs' }, _('Mode')), + E('th', { 'class': 'th col-3 middle left hide-xs' }, _('BSSID')), + E('th', { 'class': 'th col-3 middle left' }, _('Encryption')), + E('th', { 'class': 'th cbi-section-actions right' }, ' '), ]) ]); @@ -2073,13 +2079,13 @@ return view.extend({ .then(L.bind(this.poll_status, this, nodes)); }, this), 5); - 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')), - E('div', { 'class': 'th' }, _('Host')), - E('div', { 'class': 'th' }, _('Signal / Noise')), - E('div', { 'class': 'th' }, _('RX Rate / TX Rate')) + var table = E('table', { 'class': 'table assoclist', 'id': 'wifi_assoclist_table' }, [ + E('tr', { 'class': 'tr table-titles' }, [ + E('th', { 'class': 'th nowrap' }, _('Network')), + E('th', { 'class': 'th hide-xs' }, _('MAC-Address')), + E('th', { 'class': 'th' }, _('Host')), + E('th', { 'class': 'th' }, _('Signal / Noise')), + E('th', { 'class': 'th' }, _('RX Rate / TX Rate')) ]) ]);