luci-app-usteer: filter repeated SSIDs in config
authorMiguel Angel Mulero Martinez <migmul@gmail.com>
Wed, 14 Feb 2024 07:03:43 +0000 (08:03 +0100)
committerPaul Donald <newtwen@gmail.com>
Thu, 15 Feb 2024 19:06:38 +0000 (20:06 +0100)
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 2841d28396984431f3cf313cf0fbf381441ec40e)

applications/luci-app-usteer/htdocs/luci-static/resources/view/usteer/usteer.js

index 5cbc8c7a404df64798dfc28ae1fb497bf1211dd2..daa5ec64df3e12e6afacedf6696f68bdfcece4ef 100644 (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())
                        }
                });