Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-app-usteer: retrieve SSIDs to be used in the config #6891

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand Down Expand Up @@ -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()
]);
},

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)';

Expand Down