luci-mod-dashboard: hide wireless pane when there are no radios
authorRani Hod <rani.hod@gmail.com>
Thu, 13 Apr 2023 08:45:03 +0000 (11:45 +0300)
committerJo-Philipp Wich <jo@mein.io>
Thu, 2 Nov 2023 10:47:33 +0000 (11:47 +0100)
Implements feature request #4472.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
(cherry picked from commit b5836cd8252866a5d8993511bcd920b2bd3afe06)

modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js

index f48622fd661735cd83f0cb18496e0e7cbf361f47..318c3abf877e248d773b240444ef7db6ed391ba3 100644 (file)
@@ -262,6 +262,8 @@ return baseclass.extend({
 
                this.renderUpdateData(data[0], data[1], data[2]);
 
-               return this.renderHtml();
+               if (this.params.wifi.radios.length)
+                       return this.renderHtml();
+               return E([]);
        }
 });