From 948ca3712fe5adf98933106328b089fbed4bb61a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 30 Sep 2019 12:39:33 +0200 Subject: luci-base: network.js: implement getMeshID() getter Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/network.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index a85e2414b..a9e65dac5 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -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'); }, -- cgit v1.2.3