summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAnton Kikin <a.kikin@tano-systems.com>2020-02-18 14:00:01 +0300
committerAnton Kikin <a.kikin@tano-systems.com>2020-02-18 14:00:01 +0300
commit2d8299338e6c77fb15c457f5cf7f34dc0278db60 (patch)
treea3be27b81dc5bc85266635f8e9bde14059a90e77
parentbebfe208f7ad4a5531408e56dc08ef2831219d08 (diff)
luci-base: Add missed config parameter for cbi when converting to JSON
The cbi() function has a second argument 'config' in which various configuration parameters can be passed. When converting the lua menu to JSON, we must also convert this parameter. Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
-rw-r--r--modules/luci-base/luasrc/dispatcher.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index c227b68c85..118ca221ae 100644
--- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -193,7 +193,8 @@ local function target_to_json(target, module)
elseif target.type == "cbi" then
action = {
["type"] = "cbi",
- ["path"] = target.model
+ ["path"] = target.model,
+ ["config"] = target.config
}
elseif target.type == "form" then
action = {