luci-mod-dashboard: hide wireless pane when there are no radios 6341/head
authorRani Hod <rani.hod@gmail.com>
Thu, 13 Apr 2023 08:45:03 +0000 (11:45 +0300)
committerRani Hod <rani.hod@gmail.com>
Tue, 18 Apr 2023 14:17:38 +0000 (17:17 +0300)
Implements feature request #4472.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
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([]);
        }
 });