luci-base: network.js: implement getMeshID() getter
authorJo-Philipp Wich <jo@mein.io>
Mon, 30 Sep 2019 10:39:33 +0000 (12:39 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 30 Sep 2019 10:39:33 +0000 (12:39 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/network.js

index a85e2414b660e4ed74caa3875968afac3d42055c..a9e65dac51fad0ba40ea5cbab0b7d7e8840043bf 100644 (file)
@@ -2121,9 +2121,19 @@ WifiNetwork = L.Class.extend({
        },
 
        getSSID: function() {
+               if (this.getMode() == 'mesh')
+                       return null;
+
                return this.ubus('net', 'config', 'ssid') || this.get('ssid');
        },
 
+       getMeshID: function() {
+               if (this.getMode() != 'mesh')
+                       return null;
+
+               return this.ubus('net', 'config', 'mesh_id') || this.get('mesh_id');
+       },
+
        getBSSID: function() {
                return this.ubus('net', 'config', 'bssid') || this.get('bssid');
        },