summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/controller/admin
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-12-06 21:51:32 +0100
committerJo-Philipp Wich <jo@mein.io>2019-12-16 18:07:17 +0100
commit16853bcd2e4224c281731adbfa490d704784ec20 (patch)
treebb7bb7a98e6ed2a58026b2b369fcd4cd23d2a17e /modules/luci-base/luasrc/controller/admin
parentcf1219bd0790506279b14007595e8389e5eb99ff (diff)
luci-base: convert menu nodes to JSON
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/controller/admin')
-rw-r--r--modules/luci-base/luasrc/controller/admin/index.lua79
-rw-r--r--modules/luci-base/luasrc/controller/admin/uci.lua26
2 files changed, 0 insertions, 105 deletions
diff --git a/modules/luci-base/luasrc/controller/admin/index.lua b/modules/luci-base/luasrc/controller/admin/index.lua
index 0cebfa4f57..68bbd38a71 100644
--- a/modules/luci-base/luasrc/controller/admin/index.lua
+++ b/modules/luci-base/luasrc/controller/admin/index.lua
@@ -3,85 +3,6 @@
module("luci.controller.admin.index", package.seeall)
-function index()
- function toplevel_page(page, preflookup, preftarget)
- if preflookup and preftarget then
- if lookup(preflookup) then
- page.target = preftarget
- end
- end
-
- if not page.target then
- page.target = firstchild()
- end
- end
-
- local uci = require("luci.model.uci").cursor()
-
- local root = node()
- if not root.target then
- root.target = alias("admin")
- root.index = true
- end
-
- local page = node("admin")
-
- page.title = _("Administration")
- page.order = 10
- page.sysauth = "root"
- page.sysauth_authenticator = "htmlauth"
- page.ucidata = true
- page.index = true
- page.target = firstnode()
-
- -- Empty menu tree to be populated by addons and modules
-
- page = node("admin", "status")
- page.title = _("Status")
- page.order = 10
- page.index = true
- -- overview is from mod-admin-full
- toplevel_page(page, "admin/status/overview", alias("admin", "status", "overview"))
-
- page = node("admin", "system")
- page.title = _("System")
- page.order = 20
- page.index = true
- -- system/system is from mod-admin-full
- toplevel_page(page, "admin/system/system", alias("admin", "system", "system"))
-
- -- Only used if applications add items
- page = node("admin", "vpn")
- page.title = _("VPN")
- page.order = 30
- page.index = true
- toplevel_page(page, false, false)
-
- -- Only used if applications add items
- page = node("admin", "services")
- page.title = _("Services")
- page.order = 40
- page.index = true
- toplevel_page(page, false, false)
-
- -- Even for mod-admin-full network just uses first submenu item as landing
- page = node("admin", "network")
- page.title = _("Network")
- page.order = 50
- page.index = true
- toplevel_page(page, false, false)
-
- page = entry({"admin", "translations"}, call("action_translations"), nil)
- page.leaf = true
-
- page = entry({"admin", "ubus"}, call("action_ubus"), nil)
- page.sysauth = false
- page.leaf = true
-
- -- Logout is last
- entry({"admin", "logout"}, call("action_logout"), _("Logout"), 999)
-end
-
function action_logout()
local dsp = require "luci.dispatcher"
local utl = require "luci.util"
diff --git a/modules/luci-base/luasrc/controller/admin/uci.lua b/modules/luci-base/luasrc/controller/admin/uci.lua
index 6b19c62f81..7aad10d58a 100644
--- a/modules/luci-base/luasrc/controller/admin/uci.lua
+++ b/modules/luci-base/luasrc/controller/admin/uci.lua
@@ -4,32 +4,6 @@
module("luci.controller.admin.uci", package.seeall)
-function index()
- local redir = luci.http.formvalue("redir", true)
- or table.concat(luci.dispatcher.context.request, "/")
-
- entry({"admin", "uci"}, nil, _("Configuration"))
- entry({"admin", "uci", "revert"}, post("action_revert"), nil)
-
- local node
- local authen = function(checkpass, allowed_users)
- return "root", luci.http.formvalue("sid")
- end
-
- node = entry({"admin", "uci", "apply_rollback"}, post("action_apply_rollback"), nil)
- node.cors = true
- node.sysauth_authenticator = authen
-
- node = entry({"admin", "uci", "apply_unchecked"}, post("action_apply_unchecked"), nil)
- node.cors = true
- node.sysauth_authenticator = authen
-
- node = entry({"admin", "uci", "confirm"}, call("action_confirm"), nil)
- node.cors = true
- node.sysauth = false
-end
-
-
local function ubus_state_to_http(errstr)
local map = {
["Invalid command"] = 400,