Skip to content

Commit

Permalink
Enable/disable Multi-AP Vendor Extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
seud0nym committed Mar 20, 2022
1 parent a58f129 commit f68e691
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"Truong",
"unhide",
"unhiding",
"vendorextensions",
"wansensing",
"wifi",
"WLAN",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
^vendorextensions /etc/init.d/multiap_vendorextensions restart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

local config_vendorextensions = "vendorextensions"

-- uci.vendorextensions
mapper("uci_1to1").registerConfigMap(config_vendorextensions)

-- uci.vendorextensions.multiap_vendorextensions
local vendorextensions_multiap_vendorextensions = {
config = config_vendorextensions,
section = "multiap_vendorextensions",
type = "global",
options = { "enable" }
}

mapper("uci_1to1").registerSimpleMap(vendorextensions_multiap_vendorextensions)
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local mapParams = {
agent_enabled = "uci.multiap.agent.enabled",
agent_dhm = "uci.multiap.agent.default_hysteresis_margin",
controller_enabled = "uci.multiap.controller.enabled",
vendorextensions_enabled = "uci.vendorextensions.multiap_vendorextensions.enable",
cpc_mri = "uci.multiap.controller_policy_config.metrics_report_interval",
cpc_amcutd = "uci.multiap.controller_policy_config.ap_metrics_channel_utilization_threshold_dbm",
cpc_smrhm = "uci.multiap.controller_policy_config.sta_metrics_rssi_hysteresis_margin",
Expand All @@ -35,6 +36,7 @@ local mapValid = {
agent_enabled = vB,
agent_dhm = vPN,
controller_enabled = vB,
vendorextensions_enabled = vB,
cpc_mri = vPN,
cpc_amcutd = vPN,
cpc_smrhm = vPN,
Expand Down Expand Up @@ -146,6 +148,8 @@ ngx.print( ui_helper.createHeader(T"Wi-Fi Boosters",false,true,nil)); ngx.print(
html[#html+1] = "<legend><small>"..T"Band Lock".."</small></legend>"
html[#html+1] = ui_helper.createSwitch(T"Active","bandlock",content["bandlock"])
end
html[#html+1] = "<legend><small>"..T"Vendor Extensions".."</small></legend>"
html[#html+1] = ui_helper.createSwitch(T"Enabled","vendorextensions_enabled",content["vendorextensions_enabled"])
html[#html+1] = "</fieldset>"
if ap_path then
html[#html+1] = "<fieldset><legend>"..T"Wireless Backhaul".."</legend>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local ipairs,string = ipairs,string
local proxy = require("datamodel")

local items = {
{"wireless-boosters-modal.lp",T"MultiAP Status"},
{"wireless-boosters-modal.lp",T"EasyMesh Status"},
}

local controller_state = proxy.get("uci.multiap.controller.enabled")
Expand Down

0 comments on commit f68e691

Please sign in to comment.