summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-usteer/htdocs/luci-static
diff options
context:
space:
mode:
authorMiguel Angel Mulero Martinez <migmul@gmail.com>2024-02-05 19:35:00 +0100
committerPaul Donald <itsascambutmailmeanyway@gmail.com>2024-02-06 00:11:36 +0100
commit5b6a70575469affbff94229353a7f7e1c58a7a1b (patch)
tree62091c6cc79d3aa3130fb3382028842aa398b324 /applications/luci-app-usteer/htdocs/luci-static
parent0fbe58e84ed39eaf7825901cd2f115514ff3def9 (diff)
luci-app-usteer: retrieve SSIDs to be used in the config
This commit retrieves the list of SSIDs availables to prepopulate the ssid_list UI element of the config. Signed-off-by: Miguel Angel Mulero Martinez <migmul@gmail.com>
Diffstat (limited to 'applications/luci-app-usteer/htdocs/luci-static')
-rw-r--r--applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js
index 6fedd2f41a..ce245a4dc7 100644
--- a/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js
+++ b/applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js
@@ -6,9 +6,10 @@
'require ui';
'require form';
'require uci';
+'require network';
'require tools.widgets as widgets';
-var Hosts, Remotehosts, Remoteinfo, Localinfo, Clients;
+var Hosts, Remotehosts, Remoteinfo, Localinfo, Clients, WifiNetworks;
var dns_cache = [];
@@ -326,7 +327,8 @@ return view.extend({
this.callGetRemotehosts().catch (function (){return null;}),
this.callGetRemoteinfo().catch (function (){return null;}),
this.callGetLocalinfo().catch (function (){return null;}),
- this.callGetClients().catch (function (){return null;})
+ this.callGetClients().catch (function (){return null;}),
+ network.getWifiNetworks()
]);
},
@@ -379,6 +381,7 @@ return view.extend({
Remoteinfo = data[3];
Localinfo = data[4];
Clients = data[5];
+ WifiNetworks = data[6];
s = m.section(form.TypedSection);
s.anonymous = true;
@@ -606,7 +609,12 @@ return view.extend({
o.optional = true;
o.datatype = 'list(string)';
- o = s.taboption('settings', form.DynamicList, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on'));
+ o = s.taboption('settings', form.MultiValue, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on'));
+ WifiNetworks.forEach(function (wifiNetwork) {
+ if (wifiNetwork.getSSID()) {
+ o.value(wifiNetwork.getSSID())
+ }
+ });
o.optional = true;
o.datatype = 'list(string)';