luci-base: network.js: implement getMeshID() getter

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-30 12:39:33 +02:00
parent f1db82399a
commit 948ca3712f

View 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');
},