luci-lua-runtime: dispatcher.lua: translate legacy node "target" property
authorJo-Philipp Wich <jo@mein.io>
Thu, 10 Nov 2022 21:33:38 +0000 (22:33 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 10 Nov 2022 21:33:38 +0000 (22:33 +0100)
commit1da816ddf2b811ae98b5c05f1dbf84653071873e
tree6eb5ccfd572e4c4e14dc452dcf03fb460b98213c
parent73aca68b9e35857ec155f33ca1b1fb5358d69e52
luci-lua-runtime: dispatcher.lua: translate legacy node "target" property

Some legacy Lua controllers declare menu entries by first invoking `node()`
and then setting the `.target` property on the resulting object.

Make sure to properly translate such menu nodes into the internal menu
JSON representation.

Fixes: #6090
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-lua-runtime/luasrc/dispatcher.lua