summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-13 14:19:33 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-13 14:19:33 +0200
commit88c16e17d92d68524e9583924f832c79113175f5 (patch)
treec6f5b654fe4de73b0ede57806ab0da91d9afe9e9 /modules/luci-mod-network
parent2dd17fad6cfda3e54bc59de9a58fa789767a11d4 (diff)
luci-mod-network: wireless.js: restore mac hints in mac list widget
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js10
1 files changed, 9 insertions, 1 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 b50008b5c8..6c254c059e 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
@@ -893,7 +893,15 @@ return L.view.extend({
o.datatype = 'macaddr';
o.depends('macfilter', 'allow');
o.depends('macfilter', 'deny');
- //nt.mac_hints(function(mac, name) ml:value(mac, '%s (%s)' %{ mac, name }) end);
+ o.load = function(section_id) {
+ return network.getHostHints().then(L.bind(function(hints) {
+ hints.getMACHints().map(L.bind(function(hint) {
+ this.value(hint[0], hint[1] ? '%s (%s)'.format(hint[0], hint[1]) : hint[0]);
+ }, this));
+
+ return form.DynamicList.prototype.load.apply(this, [section_id]);
+ }, this));
+ };
mode.value('ap-wds', '%s (%s)'.format(_('Access Point'), _('WDS')));
mode.value('sta-wds', '%s (%s)'.format(_('Client'), _('WDS')));