[luci] Can't understand how to di simple things with buttons
ZioPRoTo (Saverio Proto)
zioproto at gmail.com
Wed Feb 3 19:31:30 CET 2010
It is the all day I'm getting crazy on this.
I have an application of two files:
File1:
/usr/lib/lua/luci/controller/myapp/myapp.lua
Contains:
module("luci.controller.myapp.myapp", package.seeall)
function index()
entry({"admin", "network", "chiavi"}, cbi("myapp/chiavi"),
"Keys", 30).dependent=false
end
File2:
/usr/lib/lua/luci/model/cbi/myapp/chiavi.lua
Contains:
m = Map("myapp", translate("somthing"), translate("something"))
s= m:section(TypedSection,"myconfig")
s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
qi= s:option(Value,"queue")
return m
Now I'm losing the all day to do this stupid thing. In the
configuration page I need to add another section
I guess something like:
c=m:section(SOMETYPE,"commands").
And I want to draw two buttons (like start and stop), and when I push
them I want luci.sys.exec to do simple stuff like (killall myapp) or
/sbin/myapp.
ANY GOOD EXAMPLE ??
Thanks.
Saverio
More information about the luci
mailing list