|
/usr/lib/lua/luci/dispatcher.lua:433: Failed to execute cbi dispatcher target for entry '/admin/system/test-cbi'.
The called action terminated with an exception:
/usr/lib/lua/luci/cbi.lua:360: bad argument #1 to 'save' (string expected, got table)
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:433: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:168: in function </usr/lib/lua/luci/dispatcher.lua:167>
/////////////////////////////////////////////////////以下是出错的代码,不知道哪里的问题
////////////////////////////////////////system.lua/////////////////////////////////////////
entry({"admin", "system", "test-cbi"}, cbi("admin_system/test"), _("test-cbi"), 4).dependent = false
///////////////////////////////////////test.lua/////////////////////////////////////////////
m = Map("network", translate("Test Page by hades"), translate("On this page we can learn how the .lua work"))
m:chain(luci)
s = m:section(TypedSection, "netset", translate("Network Configuration"))
s.anonymous = true
s.addremove = true
s:tab("wan1", translate("Config wan1"))
ipaddr1 = s:taboption("wan1", Value, "ipaddr1", translate("address"))
ipaddr1.datatype = "ip4addr"
netmask1 = s:taboption("wan1", Value, "netmask1", translate("netmask"))
netmask1.datatype = "ip4addr"
netmask1:value("255.255.255.0")
netmask1:value("255.255.0.0")
netmask1:value("255.0.0.0")
gateway1 = s:taboption("wan1", Value, "gateway1", translate("gateway"))
gateway1.datatype = "ip4addr"
return m
////////////////////////////config/network////////////////////////
config netset |
|