Split up admin-core into admin-core and admin-full, preparing admin-mini

This commit is contained in:
Steven Barth 2008-07-15 08:47:36 +00:00
parent 4d7c453ea8
commit 97ff4a156f
43 changed files with 89 additions and 6 deletions

View File

@ -286,7 +286,7 @@ endef
define Package/luci-mod-admin-core
$(call Package/luci/webtemplate)
DEPENDS+=+luci-web +luci-cbi +luci-theme-openwrt +luci-i18n-english
TITLE:=Administration module
TITLE:=Administration core module
endef
define Package/luci-mod-admin-core/install
@ -294,9 +294,31 @@ define Package/luci-mod-admin-core/install
endef
define Package/luci-mod-admin-mini
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core
TITLE:=Simplified Administration module
endef
define Package/luci-mod-admin-mini/install
$(call Package/luci/install/template,$(1),modules/admin-mini)
endef
define Package/luci-mod-admin-full
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core
TITLE:=Full featured Administration module
endef
define Package/luci-mod-admin-full/install
$(call Package/luci/install/template,$(1),modules/admin-full)
endef
define Package/luci-mod-freifunk
$(call Package/luci/fftemplate)
DEPENDS:=+luci-mod-admin-core
DEPENDS:=+luci-mod-admin-full
TITLE:=LuCI Freifunk module
endef
@ -325,7 +347,7 @@ endef
define Package/luci-app-firewall
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core
DEPENDS+=+luci-mod-admin-full
TITLE:=Firewall and Portforwarding application
endef
@ -340,7 +362,7 @@ endef
define Package/luci-app-olsr
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core +olsrd-mod-txtinfo
DEPENDS+=+luci-mod-admin-full +olsrd-mod-txtinfo
TITLE:=OLSR configuration and status module
endef
@ -351,7 +373,7 @@ endef
define Package/luci-app-qos
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core +qos-scripts
DEPENDS+=+luci-mod-admin-full +qos-scripts
TITLE:=Quality of Service configuration module
endef
@ -377,7 +399,7 @@ endef
define Package/luci-app-statistics
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core +collectd +collectd-mod-rrdtool1 +rrdtool1
DEPENDS+=+luci-mod-admin-full +collectd +collectd-mod-rrdtool1 +rrdtool1
TITLE:=LuCI Statistics Application
endef
@ -516,6 +538,12 @@ endif
ifneq ($(CONFIG_PACKAGE_luci-mod-admin-core),)
PKG_SELECTED_MODULES+=modules/admin-core
endif
ifneq ($(CONFIG_PACKAGE_luci-mod-admin-mini),)
PKG_SELECTED_MODULES+=modules/admin-mini
endif
ifneq ($(CONFIG_PACKAGE_luci-mod-admin-full),)
PKG_SELECTED_MODULES+=modules/admin-full
endif
ifneq ($(CONFIG_PACKAGE_luci-mod-freifunk),)
PKG_SELECTED_MODULES+=modules/freifunk
endif
@ -592,6 +620,8 @@ $(eval $(call BuildPackage,luci-ff-berlin))
$(eval $(call BuildPackage,luci-ff-augsburg))
$(eval $(call BuildPackage,luci-mod-admin-core))
#$(eval $(call BuildPackage,luci-mod-admin-mini))
$(eval $(call BuildPackage,luci-mod-admin-full))
$(eval $(call BuildPackage,luci-mod-freifunk))
$(eval $(call BuildPackage,luci-app-ffwizard-leipzig))

View File

@ -0,0 +1,2 @@
include ../../build/config.mk
include ../../build/module.mk

View File

@ -0,0 +1,2 @@
include ../../build/config.mk
include ../../build/module.mk

View File

@ -0,0 +1,49 @@
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
module("luci.controller.admin.index", package.seeall)
function index()
luci.i18n.loadc("admin-core")
local i18n = luci.i18n.translate
local root = node()
if not root.target then
root.target = alias("admin")
end
entry({"about"}, template("about")).i18n = "admin-core"
local page = node("admin")
page.target = alias("admin", "index")
page.title = i18n("administration", "Administration")
page.order = 10
page.i18n = "admin-core"
page.sysauth = "root"
local page = node("admin", "index")
page.target = template("admin_index/index")
page.title = i18n("overview", "Übersicht")
page.order = 10
local page = node("admin", "index", "luci")
page.target = cbi("admin_index/luci")
page.title = i18n("a_i_ui", "Oberfläche")
entry({"admin", "logout"}, call("action_logout"), i18n("logout"))
end
function action_logout()
luci.http.header("Set-Cookie", "sysauth=; path=/")
luci.http.redirect(luci.dispatcher.build_url())
end