From 0f91ef83afa5236c866605515994a63fa363a65b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 19 Sep 2018 20:05:16 +0200 Subject: [PATCH] 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 --- modules/luci-base/luasrc/controller/admin/index.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/luci-base/luasrc/controller/admin/index.lua b/modules/luci-base/luasrc/controller/admin/index.lua index 360298b1c..7e0a20743 100644 --- a/modules/luci-base/luasrc/controller/admin/index.lua +++ b/modules/luci-base/luasrc/controller/admin/index.lua @@ -25,14 +25,14 @@ function index() end local page = node("admin") - + page.title = _("Administration") page.order = 10 page.sysauth = "root" page.sysauth_authenticator = "htmlauth" page.ucidata = 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 @@ -48,7 +48,7 @@ function index() page.order = 20 page.index = true -- 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 page = node("admin", "services") -- 2.25.1