Hi community:
I want to do some customization with LUCI21.02.
After some study, I understand the basic concept of LUCI. https://openwrt.org/docs/guide-developer/luci
From this article, I learned if I want to add a new element to LUCI, at least I need to define a new module and entry like this:
module("luci.controller.myapp.new_tab", package.seeall) --notice that new_tab is the name of the file new_tab.lua
function index()
entry({"admin", "new_tab"}, firstchild(), "New tab", 60).dependent=false --this adds the top level tab and defaults to the first sub-tab (tab_from_cbi), also it is set to position 30
And add a cbi_tab like this:
m = Map("cbi_file", translate("First Tab Form"), translate("Please fill out the form below")) -- cbi_file is the config file in /etc/config
d = m:section(TypedSection, "info", "Part A of the form") -- info is the section called info in cbi_file
a = d:option(Value, "name", "Name"); a.optional=false; a.rmempty = false; -- name is the option in the cbi_file
return m
But after query the source code of LUCI21.02, I didn't find the entry and cbi element in it.
My configration is like this:
besides, I notice another article which was marked like this:
Reference: CBI (FIXME: obsolete now that we have client-side CBI in Javascript?)
My question is:
1.Where is the entry and cbi element defined in LUCI21.02?
2.Where can I get the latest reference about CBI?
Hi Jow
Do you have any document about how to add a element with "client side JS"?
We still need to know the basic concept(programming guide line) about the new structure.