Luciの OpenWRT モジュール用の Web インターフェイスを構築しようとしています。次のコードがあります。
m = Map("amld_cbi", translate ("amld_status"))
s = m:section(TypedSection, "amld_conf","Status")
fqdn = s:option(DummyValue, "fqdn", "FQDN value")
これは、fqdn (amld_cbi 内にある) の値を画面に表示する場合にうまく機能します。ここで、文字列値自体が必要です。
私がやろうとすると:
m = Map("amld_cbi", translate ("amld_status"))
s = m:section(TypedSection, "amld_conf","Status")
fqdn = s:option(DummyValue, "fqdn", "FQDN value")
luci.sys.call("amld " .. fqdn)
次のエラーが表示されます。
The called action terminated with an exception:
/usr/lib/lua/luci/model/cbi/amld/amld_status.lua:25: attempt to concatenate global 'fqdn' (a table value)
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>
変数 fqdn から実際の値を取得する方法を知っている人はいますか?