luci-app-usteer: filter repeated SSIDs in config

When the SSID name was the same in different radio, they appear repeated in the options. This commit filter them.

Signed-off-by: Miguel Angel Mulero Martinez <migmul@gmail.com>
(cherry picked from commit 2841d28396)
This commit is contained in:
Miguel Angel Mulero Martinez 2024-02-14 08:03:43 +01:00 committed by Paul Donald
parent 913394041e
commit cafe095146

View File

@ -611,7 +611,7 @@ return view.extend({
o = s.taboption('settings', form.DynamicList, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on'));
WifiNetworks.forEach(function (wifiNetwork) {
if (wifiNetwork.getSSID()) {
if (wifiNetwork.getSSID() && (!o.keylist || o.keylist.indexOf(wifiNetwork.getSSID()) === -1)) {
o.value(wifiNetwork.getSSID())
}
});