summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorVladislav Grigoryev <vg.aetera@gmail.com>2021-08-15 02:37:44 +0300
committerVladislav Grigoryev <vg.aetera@gmail.com>2021-08-15 02:56:45 +0300
commit376af36975579008e3176a860ae032759d27dcbb (patch)
treec443eb0303810804f811f313da6322054973e46f /modules/luci-base/htdocs/luci-static/resources
parent6047ec0cd02e6eb56a70cd71637844f4f3eaf257 (diff)
luci-base: support loopback by widgets.NetworkSelect
Support the "loopback" interface by "widgets.NetworkSelect". Enable the "loopback" option to include this interface. Can be used to configure interface binding for services. Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/tools/widgets.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js
index 3f2b7b9ffc..35a4dc8ec9 100644
--- a/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js
+++ b/modules/luci-base/htdocs/luci-static/resources/tools/widgets.js
@@ -372,7 +372,10 @@ var CBINetworkSelect = form.ListValue.extend({
var network = this.networks[i],
name = network.getName();
- if (name == 'loopback' || name == this.exclude || !this.filter(section_id, name))
+ if (name == this.exclude || !this.filter(section_id, name))
+ continue;
+
+ if (name == 'loopback' && !this.loopback)
continue;
if (this.novirtual && network.isVirtual())