mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-app-usteer: Extra error checking
Added extra error checking. When you directly load the usteer page "/cgi-bin/luci/admin/network/usteer" then somehow the wifi networks do not get populated, this throws an error. Also fixed another console error related to the hostnames. Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
This commit is contained in:
committed by
Paul Donald
parent
9c0f071bbd
commit
59a1910b14
@@ -192,6 +192,7 @@ function collectRemoteHosts (remotehosttableentries,Remotehosts) {
|
||||
dns_cache[address] = replies[address];
|
||||
continue;
|
||||
} else {
|
||||
if (Hosts.length >0)
|
||||
dns_cache[address]=Hosts[
|
||||
Object.keys(Hosts).find(mac =>
|
||||
((typeof Hosts[mac]['name'] !== 'undefined') &&
|
||||
@@ -328,7 +329,7 @@ return view.extend({
|
||||
this.callGetRemoteinfo().catch (function (){return null;}),
|
||||
this.callGetLocalinfo().catch (function (){return null;}),
|
||||
this.callGetClients().catch (function (){return null;}),
|
||||
network.getWifiNetworks()
|
||||
network.getWifiNetworks().catch (function (){return null;})
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -624,6 +625,7 @@ return view.extend({
|
||||
|
||||
o = s.taboption('settings', form.DynamicList, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on')+' ('+_('empty means all')+')');
|
||||
WifiNetworks.forEach(function (wifiNetwork) {
|
||||
if (wifiNetwork && typeof wifiNetwork === 'object')
|
||||
if (wifiNetwork.getSSID() && (!o.keylist || o.keylist.indexOf(wifiNetwork.getSSID()) === -1)) {
|
||||
o.value(wifiNetwork.getSSID())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user