luci-base: switch admin category node to firstnode() action
After this change, luci-base will render the first module or application page installed on the system, instead of rendering a "Component not found" message when the status category is unavailable. This allows for single-purpose LuCI installations like e.g. luci-base with luci-app-travelmate which only presents application specific views without any of the standard system pages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
11f7817d33
commit
0f91ef83af
1 changed files with 3 additions and 3 deletions
|
@ -25,14 +25,14 @@ function index()
|
||||||
end
|
end
|
||||||
|
|
||||||
local page = node("admin")
|
local page = node("admin")
|
||||||
|
|
||||||
page.title = _("Administration")
|
page.title = _("Administration")
|
||||||
page.order = 10
|
page.order = 10
|
||||||
page.sysauth = "root"
|
page.sysauth = "root"
|
||||||
page.sysauth_authenticator = "htmlauth"
|
page.sysauth_authenticator = "htmlauth"
|
||||||
page.ucidata = true
|
page.ucidata = true
|
||||||
page.index = true
|
page.index = true
|
||||||
toplevel_page(page, "admin/status/overview", alias("admin", "status"))
|
page.target = firstnode()
|
||||||
|
|
||||||
-- Empty menu tree to be populated by addons and modules
|
-- Empty menu tree to be populated by addons and modules
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ function index()
|
||||||
page.order = 20
|
page.order = 20
|
||||||
page.index = true
|
page.index = true
|
||||||
-- system/system is from mod-admin-full
|
-- system/system is from mod-admin-full
|
||||||
toplevel_page(page, "admin/system/system", alias("admin", "system", "system"))
|
toplevel_page(page, "admin/system/system", alias("admin", "system", "system"))
|
||||||
|
|
||||||
-- Only used if applications add items
|
-- Only used if applications add items
|
||||||
page = node("admin", "services")
|
page = node("admin", "services")
|
||||||
|
|
Loading…
Reference in a new issue