[luci] Customizing menus

Frank Parker mr.frank.parker at gmail.com
Thu Nov 17 00:10:32 CET 2011


On Tue, Nov 15, 2011 at 7:34 PM, chris at martin.cc <chris at martin.cc> wrote:

> What you really want is
> /etc/config/myapp like this:
> -------------------------
> config 'myapp' 'device'
>        option 'key' '1234567890eeefff'
>        option 'enable'   '1'
>  -------------------------
>
> /usr/lib/lua/luci/model/cbi/mini/myapp.lua like this:
> -------------------------
> m = Map("myapp", "MyApp")
> s = m:section(NamedSection, "device", "myapp")
> s:option(Value, "key", "Key", "See admin for your key")
> s"option(Flag, "enable", "Enable")
> return m
>  -------------------------

This helps a lot, thanks!


> Also you can make the changes take effect on save using the file
> /etc/config/ucitrack
> here you list your config file, and which applications it effects, and which
> init script needs to be run to reload the configuration

Not sure my question was clear.  When I make a change to a LuCI menu
how can I see that change without rebooting the router?  I have
noticed that if I change model/cbi/mini/myapp.lua the changes are
reflected immediately upon a page reload.

But the changes I make to controller/mini/myapp.lua (modifying menus)
are not reflected in the menus until after a router reboot.

-parker


More information about the luci mailing list