From 06461e07b53eafb369b561ed46216b3628e86335 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Sun, 22 Dec 2024 00:13:26 +0000 Subject: [PATCH] luci-mod-status: prevent trace-back loading wireless on non-WiFi devices Manifests in the console as: RPCError: RPC call to uci/get failed with ubus code 4: Resource not found The lazy-loading is harmless and has been that way for years, but the presence of the trace-back clouds other problems. This should keep the console cleaner; it conditionally attempts to load wireless when a more fundamental check for it passes. Signed-off-by: Paul Donald --- .../htdocs/luci-static/resources/view/status/include/60_wifi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js index 5804100db4..8054230530 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js @@ -184,7 +184,7 @@ return baseclass.extend({ network.getHostHints(), this.callSessionAccess('access-group', 'luci-mod-status-index-wifi', 'read'), this.callSessionAccess('access-group', 'luci-mod-status-index-wifi', 'write'), - uci.load('wireless') + L.hasSystemFeature('wifi') ? L.resolveDefault(uci.load('wireless')) : L.resolveDefault(), ]).then(L.bind(function(data) { var tasks = [], radios_networks_hints = data[1], -- 2.30.2