luci-mod-network: wireless.js: fix disabled state on disabled radio
authorJo-Philipp Wich <jo@mein.io>
Thu, 19 Sep 2019 13:48:27 +0000 (15:48 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 19 Sep 2019 13:48:27 +0000 (15:48 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

index efbc1140360101e34e6407655f7e7ade3d724b0f..e5213ff139fc3e02db6e50685979d1eea39e14d5 100644 (file)
@@ -87,7 +87,7 @@ function render_network_status(radioNet) {
        var mode = radioNet.getActiveMode(),
            bssid = radioNet.getActiveBSSID(),
            channel = radioNet.getChannel(),
-           disabled = (radioNet.get('disabled') == '1'),
+           disabled = (radioNet.get('disabled') == '1' || uci.get('wireless', radioNet.getWifiDeviceName(), 'disabled') == '1'),
            is_assoc = (bssid && bssid != '00:00:00:00:00:00' && channel && mode != 'Unknown' && !disabled),
            changecount = count_changes(radioNet.getName()),
            status_text = null;
@@ -704,7 +704,8 @@ return L.view.extend({
                                ];
                        }
                        else {
-                               var isDisabled = (inst.get('disabled') == '1');
+                               var isDisabled = (inst.get('disabled') == '1' ||
+                                       uci.get('wireless', inst.getWifiDeviceName(), 'disabled') == '1');
 
                                btns = [
                                        E('button', {