Split up admin-core into admin-core and admin-full, preparing admin-mini
authorSteven Barth <steven@midlink.org>
Tue, 15 Jul 2008 08:47:36 +0000 (08:47 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 15 Jul 2008 08:47:36 +0000 (08:47 +0000)
82 files changed:
contrib/package/luci/Makefile
modules/admin-core/luasrc/controller/admin/index.lua [deleted file]
modules/admin-core/luasrc/controller/admin/network.lua [deleted file]
modules/admin-core/luasrc/controller/admin/services.lua [deleted file]
modules/admin-core/luasrc/controller/admin/status.lua [deleted file]
modules/admin-core/luasrc/controller/admin/system.lua [deleted file]
modules/admin-core/luasrc/controller/admin/uci.lua [deleted file]
modules/admin-core/luasrc/controller/admin/wifi.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_index/luci.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_network/dhcp.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_network/ifaces.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_network/ptp.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_network/routes.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_network/vlan.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_services/dnsmasq.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_services/dropbear.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_services/httpd.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_system/system.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_wifi/devices.lua [deleted file]
modules/admin-core/luasrc/model/cbi/admin_wifi/networks.lua [deleted file]
modules/admin-core/luasrc/view/admin_index/index.htm [deleted file]
modules/admin-core/luasrc/view/admin_network/index.htm [deleted file]
modules/admin-core/luasrc/view/admin_services/index.htm [deleted file]
modules/admin-core/luasrc/view/admin_status/index.htm [deleted file]
modules/admin-core/luasrc/view/admin_status/iwscan.htm [deleted file]
modules/admin-core/luasrc/view/admin_status/routes.htm [deleted file]
modules/admin-core/luasrc/view/admin_status/syslog.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/editor.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/index.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/ipkg.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/packages.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/passwd.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/reboot.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/sshkeys.htm [deleted file]
modules/admin-core/luasrc/view/admin_system/upgrade.htm [deleted file]
modules/admin-core/luasrc/view/admin_uci/apply.htm [deleted file]
modules/admin-core/luasrc/view/admin_uci/changes.htm [deleted file]
modules/admin-core/luasrc/view/admin_uci/revert.htm [deleted file]
modules/admin-core/luasrc/view/admin_wifi/index.htm [deleted file]
modules/admin-full/Makefile [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/index.lua [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/network.lua [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/services.lua [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/status.lua [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/system.lua [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/uci.lua [new file with mode: 0644]
modules/admin-full/luasrc/controller/admin/wifi.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_index/luci.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_network/routes.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_services/dnsmasq.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_services/dropbear.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_services/httpd.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_system/system.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua [new file with mode: 0644]
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_index/index.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_network/index.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_services/index.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_status/index.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_status/iwscan.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_status/routes.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_status/syslog.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/editor.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/index.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/ipkg.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/packages.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/passwd.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/reboot.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/sshkeys.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_system/upgrade.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_uci/apply.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_uci/changes.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_uci/revert.htm [new file with mode: 0644]
modules/admin-full/luasrc/view/admin_wifi/index.htm [new file with mode: 0644]
modules/admin-mini/Makefile [new file with mode: 0644]
modules/admin-mini/luasrc/controller/index.lua [new file with mode: 0644]

index 2c30695e75f31a5ceb42793a5225f0ef801e3a2f..e369acfc4361c1edbff970db9462313f0e1cb1f4 100644 (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))
diff --git a/modules/admin-core/luasrc/controller/admin/index.lua b/modules/admin-core/luasrc/controller/admin/index.lua
deleted file mode 100644 (file)
index eb58e00..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
---[[
-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
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/controller/admin/network.lua b/modules/admin-core/luasrc/controller/admin/network.lua
deleted file mode 100644 (file)
index 8712633..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
---[[
-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.network", package.seeall)
-
-function index()
-       require("luci.i18n")
-       local i18n = luci.i18n.translate
-
-       local page  = node("admin", "network")
-       page.target = template("admin_network/index")
-       page.title  = i18n("network", "Netzwerk")  
-       page.order  = 50
-       
-       local page  = node("admin", "network", "vlan")
-       page.target = cbi("admin_network/vlan")
-       page.title  = i18n("a_n_switch", "Switch")
-       page.order  = 10
-       
-       local page  = node("admin", "network", "ifaces")
-       page.target = cbi("admin_network/ifaces")
-       page.title  = i18n("interfaces", "Schnittstellen")
-       page.order  = 20
-       
-       local page  = node("admin", "network", "dhcp")
-       page.target = cbi("admin_network/dhcp")
-       page.title  = "DHCP"
-       page.order  = 30
-       
-       local page  = node("admin", "network", "ptp")
-       page.target = cbi("admin_network/ptp")
-       page.title  = "PPPoE / PPTP"
-       page.order  = 40
-       
-       local page  = node("admin", "network", "routes")
-       page.target = cbi("admin_network/routes")
-       page.title  = i18n("a_n_routes", "Routen")
-       page.order  = 50
-end
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/controller/admin/services.lua b/modules/admin-core/luasrc/controller/admin/services.lua
deleted file mode 100644 (file)
index 59defbb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
---[[
-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.services", package.seeall)
-
-function index()
-       luci.i18n.loadc("admin-core")
-       local i18n = luci.i18n.translate
-
-       local page  = node("admin", "services")
-       page.target = template("admin_services/index")
-       page.title  = i18n("services", "Dienste")  
-       page.order  = 40
-       
-       local page  = node("admin", "services", "httpd")
-       page.target = cbi("admin_services/httpd")
-       page.title  = "Busybox HTTPd"
-       page.order  = 10
-       
-       local page  = node("admin", "services", "dropbear")
-       page.target = cbi("admin_services/dropbear")
-       page.title  = "Dropbear SSHd"
-       page.order  = 20
-       
-       local page  = node("admin", "services", "dnsmasq")
-       page.target = cbi("admin_services/dnsmasq")
-       page.title  = "Dnsmasq"
-       page.order  = 30
-end
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/controller/admin/status.lua b/modules/admin-core/luasrc/controller/admin/status.lua
deleted file mode 100644 (file)
index 3a0f040..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---[[
-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.status", package.seeall)
-
-function index()
-       luci.i18n.loadc("admin-core")
-       local i18n = luci.i18n.translate
-
-       entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20)
-       entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"))
-       entry({"admin", "status", "routes"}, template("admin_status/routes"), "Routingtabelle", 10)
-       entry({"admin", "status", "iwscan"}, template("admin_status/iwscan"), "WLAN-Scan", 20)
-end
-
-function action_syslog()
-       local syslog = luci.sys.syslog()
-       luci.template.render("admin_status/syslog", {syslog=syslog})
-end
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/controller/admin/system.lua b/modules/admin-core/luasrc/controller/admin/system.lua
deleted file mode 100644 (file)
index 862a741..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
---[[
-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.system", package.seeall)
-
-function index()
-       luci.i18n.loadc("admin-core")
-       local i18n = luci.i18n.translate
-       
-       entry({"admin", "system"}, template("admin_system/index"), i18n("system", "System"), 30)
-       entry({"admin", "system", "packages"}, call("action_packages"), i18n("a_s_packages", "Paketverwaltung"), 10)
-       entry({"admin", "system", "packages", "ipkg"}, call("action_ipkg"), i18n("a_s_p_ipkg", "IPKG-Konfiguration"))
-       entry({"admin", "system", "passwd"}, call("action_passwd"), i18n("a_s_changepw", "Passwort ändern"), 20)
-       entry({"admin", "system", "sshkeys"}, call("action_sshkeys"), i18n("a_s_sshkeys", "SSH-Schlüssel"), 30)
-       entry({"admin", "system", "system"}, cbi("admin_system/system"), i18n("system", "System"), 40)
-       entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("a_s_fstab", "Einhängepunkte"), 50)
-       entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash", "Firmwareupgrade"), 60)
-       entry({"admin", "system", "reboot"}, call("action_reboot"), i18n("reboot", "Neu starten"), 70)
-end
-
-function action_editor()
-       local file = luci.http.formvalue("file", "")
-       local data = luci.http.formvalue("data")
-       local err  = nil
-       local msg  = nil
-       local stat = true
-       
-       if file and data then
-               stat, err = luci.fs.writefile(file, data)
-       end
-       
-       if not stat then
-               err = luci.util.split(err, " ")
-               table.remove(err, 1)
-               msg = table.concat(err, " ")
-       end
-       
-       local cnt, err = luci.fs.readfile(file)
-       if cnt then
-               cnt = luci.util.pcdata(cnt)
-       end
-       luci.template.render("admin_system/editor", {fn=file, cnt=cnt, msg=msg})        
-end
-
-function action_ipkg()
-       local file = "/etc/ipkg.conf"
-       local data = luci.http.formvalue("data")
-       local stat = nil
-       local err  = nil
-       
-       if data then
-               stat, err = luci.fs.writefile(file, data)
-       end     
-       
-       local cnt  = luci.fs.readfile(file)     
-       if cnt then
-               cnt = luci.util.pcdata(cnt)
-       end
-       
-       luci.template.render("admin_system/ipkg", {cnt=cnt, msg=err})   
-end
-
-function action_packages()
-       local ipkg = require("luci.model.ipkg")
-       local void = nil
-       local submit = luci.http.formvalue("submit")
-       
-       
-       -- Search query
-       local query = luci.http.formvalue("query")
-       query = (query ~= '') and query or nil
-       
-       
-       -- Packets to be installed
-       local install = submit and luci.http.formvaluetable("install")
-       
-       -- Install from URL
-       local url = luci.http.formvalue("url")
-       if url and url ~= '' and submit then
-               if not install then
-                       install = {}
-               end
-               install[url] = 1
-       end
-       
-       -- Do install
-       if install then
-               for k, v in pairs(install) do
-                       void, install[k] = ipkg.install(k)
-               end
-       end
-       
-       
-       -- Remove packets
-       local remove = submit and luci.http.formvaluetable("remove")
-       if remove then  
-               for k, v in pairs(remove) do
-                       void, remove[k] = ipkg.remove(k)
-               end     
-       end
-       
-       
-       -- Update all packets
-       local update = luci.http.formvalue("update")
-       if update then
-               void, update = ipkg.update()
-       end
-       
-       
-       -- Upgrade all packets
-       local upgrade = luci.http.formvalue("upgrade")
-       if upgrade then
-               void, upgrade = ipkg.upgrade()
-       end
-       
-       
-       -- Package info
-       local info = luci.model.ipkg.info(query)
-       info = info or {}
-       local pkgs = {}
-       
-       -- Sort after status and name
-       for k, v in pairs(info) do
-               local x = 0
-               for i, j in pairs(pkgs) do
-                       local vins = (v.Status and v.Status.installed)
-                       local jins = (j.Status and j.Status.installed)
-                       if vins ~= jins then
-                               if vins then
-                                       break
-                               end
-                       else
-                               if j.Package > v.Package then
-                                       break
-                               end
-                       end
-                       x = i
-               end
-               table.insert(pkgs, x+1, v)
-       end 
-       
-       luci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
-        install=install, remove=remove, update=update, upgrade=upgrade})       
-end
-
-function action_passwd()
-       local p1 = luci.http.formvalue("pwd1")
-       local p2 = luci.http.formvalue("pwd2")
-       local stat = nil
-       
-       if p1 or p2 then
-               if p1 == p2 then
-                       stat = luci.sys.user.setpasswd("root", p1)
-               else
-                       stat = 10
-               end
-       end
-       
-       luci.template.render("admin_system/passwd", {stat=stat})
-end
-
-function action_reboot()
-       local reboot = luci.http.formvalue("reboot")
-       luci.template.render("admin_system/reboot", {reboot=reboot})
-       if reboot then
-               luci.sys.reboot()
-       end
-end
-
-function action_sshkeys()
-       local file = "/etc/dropbear/authorized_keys"
-       local data = luci.http.formvalue("data")
-       local stat = nil
-       local err  = nil
-       
-       if data then
-               stat, err = luci.fs.writefile(file, data)
-       end     
-       
-       local cnt  = luci.fs.readfile(file)     
-       if cnt then
-               cnt = luci.util.pcdata(cnt)
-       end
-       
-       luci.template.render("admin_system/sshkeys", {cnt=cnt, msg=err})        
-end
-
-function action_upgrade()
-       require("luci.model.uci")
-       local ret  = nil
-       local plat = luci.fs.mtime("/lib/upgrade/platform.sh")
-       
-       local image   = luci.http.upload("image")
-       local keepcfg = luci.http.formvalue("keepcfg")
-       
-       if plat and image then
-               local kpattern = nil
-               if keepcfg then
-                       local files = luci.model.uci.get_all("luci", "flash_keep")
-                       if files.luci and files.luci.flash_keep then
-                               kpattern = ""
-                               for k,v in pairs(files.luci.flash_keep) do
-                                       kpattern = kpattern .. " " ..  v
-                               end
-                       end
-               end
-               ret = luci.sys.flash(image, kpattern)
-       end
-       
-       luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret})
-end
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/controller/admin/uci.lua b/modules/admin-core/luasrc/controller/admin/uci.lua
deleted file mode 100644 (file)
index 215a13a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
---[[
-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.uci", package.seeall)
-
-function index()
-       local i18n = luci.i18n.translate
-       
-       entry({"admin", "uci"}, nil, i18n("config"))
-       entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"))
-       entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"))
-       entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"))
-end
-
-function convert_changes(changes)
-       local ret = {}
-       for r, tbl in pairs(changes) do
-               for s, os in pairs(tbl) do
-                       for o, v in pairs(os) do
-                               local val, str
-                               if (v == "") then
-                                       str = "-"
-                                       val = ""
-                               else
-                                       str = ""
-                                       val = "="..v
-                               end
-                               str = r.."."..s
-                               if o ~= ".type" then
-                                       str = str.."."..o
-                               end
-                               table.insert(ret, str..val)
-                       end
-               end
-       end
-       return table.concat(ret, "\n")
-end
-
-function action_changes()
-       local changes = convert_changes(luci.model.uci.changes())
-       luci.template.render("admin_uci/changes", {changes=changes})
-end
-
-function action_apply()
-       local changes = luci.model.uci.changes()
-       local output  = ""
-       
-       if changes then
-               local com = {}
-               local run = {}
-               
-               -- Collect files to be applied and commit changes
-               for r, tbl in pairs(changes) do
-                       if r then
-                               luci.model.uci.load(r)
-                               luci.model.uci.commit(r)
-                               luci.model.uci.unload(r)
-                               if luci.config.uci_oncommit and luci.config.uci_oncommit[r] then
-                                       run[luci.config.uci_oncommit[r]] = true
-                               end
-                       end
-               end
-               
-               -- Search for post-commit commands
-               for cmd, i in pairs(run) do
-                       output = output .. cmd .. ":" .. luci.sys.exec(cmd) .. "\n"
-               end
-       end
-       
-       
-       luci.template.render("admin_uci/apply", {changes=convert_changes(changes), output=output})
-end
-
-
-function action_revert()
-       local changes = luci.model.uci.changes()
-       if changes then
-               local revert = {}
-               
-               -- Collect files to be reverted
-               for r, tbl in pairs(changes) do
-                       luci.model.uci.load(r)
-                       luci.model.uci.revert(r)
-                       luci.model.uci.unload(r)
-               end
-       end
-       
-       luci.template.render("admin_uci/revert", {changes=convert_changes(changes)})
-end
diff --git a/modules/admin-core/luasrc/controller/admin/wifi.lua b/modules/admin-core/luasrc/controller/admin/wifi.lua
deleted file mode 100644 (file)
index 4bef0b7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---[[
-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.wifi", package.seeall)
-
-function index()
-       luci.i18n.loadc("admin-core")
-       local i18n = luci.i18n.translate
-
-       local page  = node("admin", "wifi")
-       page.target = template("admin_wifi/index")
-       page.title  = i18n("wifi", "Drahtlos")  
-       page.order  = 60
-       
-       local page  = node("admin", "wifi", "devices")
-       page.target = cbi("admin_wifi/devices")
-       page.title  = i18n("devices", "Geräte")
-       page.order  = 10
-       
-       local page  = node("admin", "wifi", "networks")
-       page.target = cbi("admin_wifi/networks")
-       page.title  = i18n("networks", "Netze")
-       page.order  = 20
-end
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua
deleted file mode 100644 (file)
index 3fdccbf..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---[[
-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$
-]]--
-require("luci.config")
-m = Map("luci", translate("webui"), translate("a_i_luci1", 
- "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden."))
-
-c = m:section(NamedSection, "main", "core", translate("general"))
-
-l = c:option(ListValue, "lang", translate("language"))
-
-local i18ndir = luci.i18n.i18ndir .. "default."
-for k, v in pairs(luci.config.languages) do
-       if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k .. ".lua") then
-               l:value(k, v)
-       end
-end
-
-t = c:option(ListValue, "mediaurlbase", translate("design"))
-for k, v in pairs(luci.config.themes) do
-       if k:sub(1, 1) ~= "." then
-               t:value(v, k)
-       end
-end
-
-u = m:section(NamedSection, "uci_oncommit", "event", translate("a_i_ucicommit"),
- translate("a_i_ucicommit1"))
-u.dynamic = true
-
-f = m:section(NamedSection, "flash_keep", "extern", translate("a_i_keepflash"),
- translate("a_i_keepflash1"))
-f.dynamic = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_network/dhcp.lua b/modules/admin-core/luasrc/model/cbi/admin_network/dhcp.lua
deleted file mode 100644 (file)
index b22f735..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
---[[
-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$
-]]--
-require("luci.model.uci")
-require("luci.sys")
-
-m = Map("dhcp", "DHCP")
-
-s = m:section(TypedSection, "dhcp", "")
-s.addremove = true
-s.anonymous = true
-
-iface = s:option(ListValue, "interface", translate("interface"))
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       iface:value(section[".name"])
-                       s:depends("interface", section[".name"])
-               end
-       end)
-
-s:option(Value, "start", translate("start")).rmempty = true
-
-s:option(Value, "limit", translate("limit")).rmempty = true
-
-s:option(Value, "leasetime").rmempty = true
-
-s:option(Flag, "dynamicdhcp").rmempty = true
-
-s:option(Value, "name", translate("name")).optional = true
-
-s:option(Flag, "ignore").optional = true
-
-s:option(Value, "netmask", translate("netmask")).optional = true
-
-s:option(Flag, "force").optional = true
-
-for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
-       k, v = line:match("([^ ]+) +([^ ]+)")
-       s:option(Value, "dhcp"..k, v).optional = true
-end
-       
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-core/luasrc/model/cbi/admin_network/ifaces.lua
deleted file mode 100644 (file)
index 2851f3a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
---[[
-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$
-]]--
-m = Map("network", translate("interfaces"), translate("a_n_ifaces1"))
-
-s = m:section(TypedSection, "interface", "")
-s.addremove = true
-s:exclude("loopback")
-s:depends("proto", "static")
-s:depends("proto", "dhcp")
-
-p = s:option(ListValue, "proto", translate("protocol"))
-p:value("static", translate("static"))
-p:value("dhcp", "DHCP")
-p.default = "static"
-
-br = s:option(Flag, "type", translate("a_n_i_bridge"), translate("a_n_i_bridge1"))
-br.enabled = "bridge"
-br.rmempty = true
-
-s:option(Value, "ifname", translate("interface"))
-
-s:option(Value, "ipaddr", translate("ipaddress"))
-
-s:option(Value, "netmask", translate("netmask")):depends("proto", "static")
-
-gw = s:option(Value, "gateway", translate("gateway"))
-gw:depends("proto", "static")
-gw.rmempty = true
-
-dns = s:option(Value, "dns", translate("dnsserver"))
-dns:depends("proto", "static")
-dns.optional = true
-
-mtu = s:option(Value, "mtu", "MTU")
-mtu.optional = true
-mtu.isinteger = true
-
-mac = s:option(Value, "macaddr", translate("macaddress"))
-mac.optional = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_network/ptp.lua b/modules/admin-core/luasrc/model/cbi/admin_network/ptp.lua
deleted file mode 100644 (file)
index 565edb7..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
---[[
-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$
-]]--
-m = Map("network", translate("a_n_ptp"), translate("a_n_ptp1"))
-
-s = m:section(TypedSection, "interface", "")
-s.addremove = true
-s:depends("proto", "pppoe")
-s:depends("proto", "pptp")
-
-p = s:option(ListValue, "proto", translate("protocol"))
-p:value("pppoe", "PPPoE")
-p:value("pptp", "PPTP")
-p.default = "pppoe"
-
-s:option(Value, "ifname", translate("interface"))
-
-s:option(Value, "username", translate("username"))
-s:option(Value, "password", translate("password"))
-
-s:option(Value, "keepalive").optional = true
-
-s:option(Value, "demand").optional = true
-
-srv = s:option(Value, "server")
-srv:depends("proto", "pptp")
-srv.optional = true
-
-mtu = s:option(Value, "mtu", "MTU")
-mtu.optional = true
-mtu.isinteger = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_network/routes.lua b/modules/admin-core/luasrc/model/cbi/admin_network/routes.lua
deleted file mode 100644 (file)
index 15f994c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
---[[
-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$
-]]--
-m = Map("network", translate("a_n_routes"), translate("a_n_routes1"))
-
-s = m:section(TypedSection, "route", "")
-s.addremove = true
-s.anonymous = true
-s.template  = "cbi/tblsection"
-
-iface = s:option(ListValue, "interface", translate("interface"))
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       iface:value(section[".name"])
-               end
-       end)
-
-s:option(Value, "target", translate("target"), translate("a_n_r_target1"))
-
-s:option(Value, "netmask", translate("netmask"), translate("a_n_r_netmask1")).rmemepty = true
-
-s:option(Value, "gateway", translate("gateway"))
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_network/vlan.lua b/modules/admin-core/luasrc/model/cbi/admin_network/vlan.lua
deleted file mode 100644 (file)
index 8cae7f9..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---[[
-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$
-]]--
-m = Map("network", translate("a_n_switch"), translate("a_n_switch1"))
-
-s = m:section(TypedSection, "switch", "")
-
-for i = 0, 15 do
-       s:option(Value, "vlan"..i, "vlan"..i).optional = true
-end
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_services/dnsmasq.lua b/modules/admin-core/luasrc/model/cbi/admin_services/dnsmasq.lua
deleted file mode 100644 (file)
index e853064..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---[[
-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$
-]]--
-m = Map("dhcp", "Dnsmasq")
-
-s = m:section(TypedSection, "dnsmasq", translate("settings"))
-s.anonymous = true
-
-s:option(Flag, "domainneeded")
-s:option(Flag, "authoritative")
-s:option(Flag, "boguspriv")
-s:option(Flag, "filterwin2k")
-s:option(Flag, "localise_queries")
-s:option(Value, "local")
-s:option(Value, "domain")
-s:option(Flag, "expandhosts")
-s:option(Flag, "nonegcache")
-s:option(Flag, "readethers")
-s:option(Value, "leasefile")
-s:option(Value, "resolvfile")
-s:option(Flag, "nohosts").optional = true
-s:option(Flag, "strictorder").optional = true
-s:option(Flag, "logqueries").optional = true
-s:option(Flag, "noresolv").optional = true
-s:option(Value, "dnsforwardmax").optional = true
-s:option(Value, "port").optional = true
-s:option(Value, "ednspacket_max").optional = true
-s:option(Value, "dhcpleasemax").optional = true
-s:option(Value, "addnhosts").optional = true
-s:option(Value, "queryport").optional = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_services/dropbear.lua b/modules/admin-core/luasrc/model/cbi/admin_services/dropbear.lua
deleted file mode 100644 (file)
index a8ce269..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---[[
-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$
-]]--
-m = Map("dropbear", "Dropbear SSHd", translate("a_srv_dropbear1"))
-
-s = m:section(TypedSection, "dropbear", "")
-s.anonymous = true
-
-port = s:option(Value, "Port", translate("port"))
-port.isinteger = true
-
-pwauth = s:option(Flag, "PasswordAuth", translate("a_srv_d_pwauth"), translate("a_srv_d_pwauth1"))
-pwauth.enabled = 'on'
-pwauth.disabled = 'off'
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_services/httpd.lua b/modules/admin-core/luasrc/model/cbi/admin_services/httpd.lua
deleted file mode 100644 (file)
index 44beb9c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---[[
-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$
-]]--
-m = Map("httpd", "Busybox HTTPd", translate("a_srv_http1"))
-
-s = m:section(TypedSection, "httpd", "")
-s.anonymous = true
-
-port = s:option(Value, "port", translate("port"))
-port.isinteger = true
-
-s:option(Value, "home", translate("a_srv_http_root"))
-
-config = s:option(Value, "c_file", translate("configfile"), translate("a_srv_http_config1"))
-config.rmempty = true
-
-realm = s:option(Value, "realm", translate("a_srv_http_authrealm"), translate("a_srv_http_authrealm1"))
-realm.rmempty = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua b/modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua
deleted file mode 100644 (file)
index be2562c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---[[
-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$
-]]--
-m = Map("fstab", translate("a_s_fstab"))
-
-mount = m:section(TypedSection, "mount", translate("a_s_fstab_mountpoints"), translate("a_s_fstab_mountpoints1"))
-mount.anonymous = true
-mount.addremove = true
-
-mount:option(Flag, "enabled", translate("enable"))
-mount:option(Value, "device", translate("device"), translate("a_s_fstab_device1"))
-mount:option(Value, "target", translate("a_s_fstab_mountpoint"))
-mount:option(Value, "fstype", translate("filesystem"), translate("a_s_fstab_fs1"))
-mount:option(Value, "options", translate("options"), translatef("manpage", "siehe '%s' manpage", "mount"))
-
-
-swap = m:section(TypedSection, "swap", "SWAP", translate("a_s_fstab_swap1"))
-swap.anonymous = true
-swap.addremove = true
-
-swap:option(Flag, "enabled", translate("enable"))
-swap:option(Value, "device", translate("device"), translate("a_s_fstab_device1"))
-
-return m
diff --git a/modules/admin-core/luasrc/model/cbi/admin_system/system.lua b/modules/admin-core/luasrc/model/cbi/admin_system/system.lua
deleted file mode 100644 (file)
index dd59d8c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---[[
-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$
-]]--
-m = Map("system", translate("system"))
-
-s = m:section(TypedSection, "system", "")
-s.anonymous = true
-
-s:option(Value, "hostname", translate("hostname"))
-s:option(Value, "timezone", translate("timezone"))
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_wifi/devices.lua b/modules/admin-core/luasrc/model/cbi/admin_wifi/devices.lua
deleted file mode 100644 (file)
index b4e0e29..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
---[[
-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$
-]]--
-m = Map("wireless", translate("devices"), translate("a_w_devices1", 
-       "An dieser Stelle können eingebaute WLAN-Geräte konfiguriert werden."))
-
-s = m:section(TypedSection, "wifi-device", "")
---s.addremove = true
-
-en = s:option(Flag, "disabled", translate("enable"))
-en.enabled = "0"
-en.disabled = "1"
-
-t = s:option(ListValue, "type", translate("type"))
-t:value("broadcom")
-t:value("atheros")
-t:value("mac80211")
-t:value("prism2")
---[[
-require("luci.sys")
-local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
-for driver in luci.sys.execl(c)[1]:gmatch("[^ ]+") do
-       t:value(driver)
-end
-]]--
-
-mode = s:option(ListValue, "mode", translate("mode"))
-mode:value("", "standard")
-mode:value("11b", "802.11b")
-mode:value("11g", "802.11g")
-mode:value("11a", "802.11a")
-mode:value("11bg", "802.11b+g")
-mode.rmempty = true
-
-s:option(Value, "channel", translate("a_w_channel"))
-
-s:option(Value, "txantenna", translate("a_w_txantenna")).rmempty = true
-
-s:option(Value, "rxantenna", translate("a_w_rxantenna")).rmempty = true
-
-s:option(Value, "distance", translate("distance"),
-       translate("a_w_distance1")).rmempty = true
-
-s:option(Value, "diversity", translate("a_w_diversity")):depends("type", "atheros")
-       
-country = s:option(Value, "country", translate("a_w_countrycode"))
-country.optional = true
-country:depends("type", "broadcom")
-
-maxassoc = s:option(Value, "maxassoc", translate("a_w_connlimit"))
-maxassoc:depends("type", "broadcom")
-maxassoc.optional = true
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/model/cbi/admin_wifi/networks.lua b/modules/admin-core/luasrc/model/cbi/admin_wifi/networks.lua
deleted file mode 100644 (file)
index f0379b3..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
---[[
-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$
-]]--
-m = Map("wireless", translate("networks"), translate("a_w_networks1"))
-
-s = m:section(TypedSection, "wifi-iface", "")
-s.addremove = true
-s.anonymous = true
-
-s:option(Value, "ssid", translate("a_w_netid")).maxlength = 32
-
-device = s:option(ListValue, "device", translate("device"))
-luci.model.uci.foreach("wireless", "wifi-device",
-       function (section)
-               device:value(section[".name"])
-       end)
-
-network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
-network:value("")
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       network:value(section[".name"])
-               end
-       end)
-
-mode = s:option(ListValue, "mode", translate("mode"))
-mode:value("ap", "Access Point")
-mode:value("adhoc", "Ad-Hoc")
-mode:value("sta", "Client")
-mode:value("wds", "WDS")
-
-s:option(Value, "bssid", "BSSID").optional = true
-
-s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true
-
-s:option(Flag, "frameburst", translate("a_w_brcmburst")).optional = true
-s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
-
-
-encr = s:option(ListValue, "encryption", translate("encryption"))
-encr:value("none", "keine")
-encr:value("wep", "WEP")
-encr:value("psk", "WPA-PSK")
-encr:value("wpa", "WPA-Radius")
-encr:value("psk2", "WPA2-PSK")
-encr:value("wpa2", "WPA2-Radius")
-
-key = s:option(Value, "key", translate("key"))
-key:depends("encryption", "wep")
-key:depends("encryption", "psk")
-key:depends("encryption", "wpa")
-key:depends("encryption", "psk2")
-key:depends("encryption", "wpa2")
-key.rmempty = true
-
-server = s:option(Value, "server", translate("a_w_radiussrv"))
-server:depends("encryption", "wpa")
-server:depends("encryption", "wpa2")
-server.rmempty = true
-
-port = s:option(Value, "port", translate("a_w_radiusport"))
-port:depends("encryption", "wpa")
-port:depends("encryption", "wpa2")
-port.rmempty = true
-
-s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")).optional = true
-
-s:option(Flag, "hidden", translate("a_w_hideessid")).optional = true
-
-
-
-return m
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_index/index.htm b/modules/admin-core/luasrc/view/admin_index/index.htm
deleted file mode 100644 (file)
index 4ea58c2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:a_i_i_hello%></h1>
-<p><%:a_i_i_admin1%></p>
-<p><%:a_i_i_admin2%><br />
-<%:a_i_i_admin3%></p>
-<p><%:a_i_i_admin4%></p>
-<p><%:a_i_i_admin5%></p>
-<p><%:a_i_i_admin6%></p>
-<p><em><strong><a href="<%=controller%>/about"><%:a_i_i_team%></a></strong></em></p> 
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_network/index.htm b/modules/admin-core/luasrc/view/admin_network/index.htm
deleted file mode 100644 (file)
index dec2864..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:network%></h1>
-<p><%:a_network1%></p>
-<p><%:a_network2%></p>
-<p><%:a_network3%></p>
-<p><%:a_network4%></p>
-<p><%:a_network5%></p>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_services/index.htm b/modules/admin-core/luasrc/view/admin_services/index.htm
deleted file mode 100644 (file)
index c0bd8b3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:services%></h1>
-<p><%:a_srv_services1%></p>
-<p><%:a_srv_services2%></p>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_status/index.htm b/modules/admin-core/luasrc/view/admin_status/index.htm
deleted file mode 100644 (file)
index e1f4b0e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:status%></h1>
-<p><%:a_st_i_status1%></p>
-<p><%:a_st_i_status2%></p> 
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_status/iwscan.htm b/modules/admin-core/luasrc/view/admin_status/iwscan.htm
deleted file mode 100644 (file)
index cbba791..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:iwscan%></h1>
-<p><%:iwscan1%></p>
-
-<br />
-<table cellspacing="0" cellpadding="6" class="smalltext">
-<tr>
-<th><%:interface%></th>
-<th>ESSID</th>
-<th>BSSID</th>
-<th><%:mode%></th>
-<th><%:channel%></th>
-<th><%:iwscan_encr%></th>
-<th><%:iwscan_link%></th>
-<th><%:iwscan_signal%></th>
-<th><%:iwscan_noise%></th>
-</tr>
-<%for iface, cells in pairs(luci.sys.wifi.iwscan()) do
-       for i, cell in ipairs(cells) do 
-%>
-<tr>
-<td><%=iface%></td>
-<td><%=cell.ESSID%></td>
-<td><%=cell.Address%></td>
-<td><%=cell.Mode%></td>
-<td><%=(cell.Channel or cell.Frequency or "")%></td>
-<td><%=cell["Encryption key"]%></td>
-<td><%=cell.Quality%></td>
-<td><%=cell["Signal level"]%></td>
-<td><%=cell["Noise level"]%></td>
-</tr>
-<%
-       end
-end
-%>
-</table>
-<br />
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_status/routes.htm b/modules/admin-core/luasrc/view/admin_status/routes.htm
deleted file mode 100644 (file)
index c4ebf34..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:routes%></h1>
-
-<br />
-<table cellspacing="0" cellpadding="6" class="smalltext">
-<tr>
-<th><%:target%></th>
-<th><%:routes_netmask%></th>
-<th><%:routes_gateway%></th>
-<th><%:routes_metric%></th>
-<th><%:interface%></th>
-</tr>
-<%
-local routes = luci.sys.net.routes()
-
-for i, r in pairs(routes) do
-%>
-<tr>
-<td><%=luci.sys.net.hexip4(r.Destination)%></td>
-<td><%=luci.sys.net.hexip4(r.Mask)%></td>
-<td><%=luci.sys.net.hexip4(r.Gateway)%></td>
-<td><%=r.Metric%></td>
-<td><%=r.Iface%></td>
-</tr>
-<% end %>
-</table>
-<br />
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_status/syslog.htm b/modules/admin-core/luasrc/view/admin_status/syslog.htm
deleted file mode 100644 (file)
index f3d1f0a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:status%></h1>
-<h2><%:syslog%></h2>
-<code><%=syslog%></code>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/editor.htm b/modules/admin-core/luasrc/view/admin_system/editor.htm
deleted file mode 100644 (file)
index bac1729..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:texteditor%></h1>
-<form method="post" action="<%=controller%>/admin/system/editor">
-<div><%:file%>: <input type="text" name="file" size="30" value="<%=fn%>" />
-<% if msg then %><span class="error"><%:error%>: <%=msg%></span><% end %></div>
-<br />
-<div><textarea style="width: 100%" rows="20" name="data"><%=cnt%></textarea></div>
-<br />
-<div>
-       <input type="submit" value="<%:save%>" />
-       <input type="reset" value="<%:reset%>" />
-</div>
-</form>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/index.htm b/modules/admin-core/luasrc/view/admin_system/index.htm
deleted file mode 100644 (file)
index 3138903..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<p><%:a_s_i_system1%></p>
-<p><%:a_s_i_system2%></p> 
-<p><%:a_s_i_system3%></p> 
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/ipkg.htm b/modules/admin-core/luasrc/view/admin_system/ipkg.htm
deleted file mode 100644 (file)
index 0cd87d9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:a_s_p_ipkg%></h2>
-
-<br />
-
-<div><strong><%:a_s_p_ipkg_pkglists%>:</strong><code>src <em>Name</em> <em>URL</em></code></div>
-<div><strong><%:a_s_p_ipkg_targets%>:</strong><code>dest <em>Name</em> <em>Pfad</em></code></div>
-
-<br />
-
-<form method="post" action="<%=REQUEST_URI%>">
-       <div class="cbi-section-node" style="width: 100%">
-               <div class="cbi-value">
-                       <div class="cbi-value-field">
-                               <textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea>
-                       </div>
-               </div>
-       </div>
-       <div>
-               <input type="submit" value="<%:save%>" />
-               <input type="reset" value="<%:reset%>" />
-       </div>
-       <% if msg then %><br /><div class="error"><%:error%>: <%=msg%></div><% end %>
-</form>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/packages.htm b/modules/admin-core/luasrc/view/admin_system/packages.htm
deleted file mode 100644 (file)
index 0f8f2c1..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:a_s_packages%></h2>
-
-<br />
-
-<% if install or remove or update or upgrade then %>
-<div class="code"><strong><%:status%>:</strong><br />
-<% if update then %>
-       <%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=update%>)</span><% end %><br />
-<% end %>
-<% if upgrade then%>
-       <%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=upgrade%>)</span><% end %><br />
-<% end %>
-<% if install then for k,v in pairs(install) do %>
-       <%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
-<% end end %>
-<% if remove then for k,v in pairs(remove) do %>
-       <%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
-<% end end %>
-</div>
-<br />
-<% end %>
-
-<div>
-<a href="<%=controller%>/admin/system/packages/ipkg"><%:a_s_packages_ipkg%></a><br />
-<a href="<%=controller%>/admin/system/packages?update=1"><%:a_s_packages_updatelist%></a><br />
-<a href="<%=controller%>/admin/system/packages?upgrade=1"><%:a_s_packages_upgrade%></a>
-</div>
-
-<br />
-<br />
-
-<form method="post" action="<%=controller%>/admin/system/packages">
-       <div>
-               <span class="bold"><%:a_s_packages_installurl%>:</span><br />
-               <input type="text" name="url" size="30" value="" />
-               <input type="submit" name="submit" value="<%:ok%>" />
-       </div>
-       
-       <br />
-       <br />
-
-       <div>
-               <span class="bold"><%:filter%>:</span>
-               <input type="text" name="query" size="20" value="<%=query%>" />
-               <input type="submit" name="search" value="<%:a_s_packages_search%>" />
-               <input type="submit" name="submit" value="<%:a_s_packages_do%>" />
-       </div>
-       
-       <br />
-       <br />
-       
-       <div>
-       <table style="font-size: 0.8em">
-               <tr>
-                       <th><%:a_s_packages_name%></th>
-                       <th><%:version%></th>
-                       <th><%:install%></th>
-                       <th><%:delete%></th>
-                       <th><%:descr%></th>
-               </tr>
-               <% for k, pkg in pairs(pkgs) do %>      
-               <tr>
-                       <td><%=pkg.Package%></td>
-                       <td><%=pkg.Version%></td>
-                       <td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed%><% end %></td>
-                       <td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled%><% end %></td>
-                       <td><%=pkg.Description%></td>
-               </tr>
-               <% end %>
-       </table>
-       </div>
-       <br />
-       <input type="submit" name="submit" value="<%:a_s_packages_do%>" />
-</form>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/passwd.htm b/modules/admin-core/luasrc/view/admin_system/passwd.htm
deleted file mode 100644 (file)
index 176abae..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:a_s_changepw%></h2>
-<p><%:a_s_changepw1%></p>
-<div><br />
-<% if stat then %>
-       <% if stat == 0 then %>
-               <code><%:a_s_changepw_changed%>!</code>
-       <% elseif stat == 10 then %>
-               <code class="error"><%:a_s_changepw_nomatch%>!</code>
-       <% else %>
-               <code class="error"><%:unknownerror%>!</code>
-       <% end %>
-<% end %>
-<% if not stat or stat == 10 then %>
-       <form method="post" action="<%=controller%>/admin/system/passwd">
-               <div class="cbi-section-node">
-                       <div class="cbi-value">
-                               <div class="cbi-value-title"><%:password%></div>
-                               <div class="cbi-value-field"><input type="password" name="pwd1" /></div>
-                       </div>
-                       <div class="cbi-value">
-                               <div class="cbi-value-title"><%:confirmation%></div>
-                               <div class="cbi-value-field"><input type="password" name="pwd2" /></div>
-                       </div>
-                       <br />
-                       <div>
-                               <input type="submit" value="<%:save%>" />
-                               <input type="reset" value="<%:reset%>" />
-                       </div>
-               </div>
-       </form>
-<% end %>
-</div>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/reboot.htm b/modules/admin-core/luasrc/view/admin_system/reboot.htm
deleted file mode 100644 (file)
index 3ddfa58..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:reboot%></h2>
-<p><%:a_s_reboot1%></p>
-<% if not reboot then %>
-<p><a href="<%=controller%>/admin/system/reboot?reboot=1"><%:a_s_reboot_do%></a></p>
-<% else %>
-<p><%:a_s_reboot_running%></p>
-<script type="text/javascript">setTimeout("location='<%=controller%>/admin'", 60000)</script>
-<% end %>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/sshkeys.htm b/modules/admin-core/luasrc/view/admin_system/sshkeys.htm
deleted file mode 100644 (file)
index 9a08af9..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:a_s_sshkeys%></h2>
-
-<br />
-
-<div><%:a_s_sshkeys1%></div>
-
-<br />
-
-<form method="post" action="<%=controller%>/admin/system/sshkeys">
-       <div class="cbi-section-node" style="width: 100%">
-               <div class="cbi-value">
-                       <div class="cbi-value-field">
-                               <textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea>
-                       </div>
-               </div>
-       </div>
-       <div>
-               <input type="submit" value="<%:save%>" />
-               <input type="reset" value="<%:reset%>" />
-       </div>
-       <% if msg then %><br /><div class="error"><%:error%>: <%=msg%></div><% end %>
-</form>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_system/upgrade.htm b/modules/admin-core/luasrc/view/admin_system/upgrade.htm
deleted file mode 100644 (file)
index 16ba50c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:system%></h1>
-<h2><%:a_s_flash%></h2>
-<p><%:a_s_flash_upgrade1%></p>
-<br />
-<% if sysupgrade and not ret then %>
-<form method="post" action="<%=luci.http.getenv("REQUEST_URI")%>" enctype="multipart/form-data">
-       <div class="cbi-section-node">
-               <div class="cbi-value clear">
-                       <div class="cbi-value-title left"><%:a_s_flash_fwimage%></div>
-                       <div class="cbi-value-field"><input type="file" size="30" name="image" /></div>
-               </div>
-               <br />
-               <div class="cbi-value clear">
-                       <input type="checkbox" name="keepcfg" value="1" checked="checked" />
-                       <span class="bold"><%:a_s_flash_keepcfg%></span>
-               </div>
-               <br />
-               <div>
-                       <input type="submit" value="<%:a_s_flash_fwupgrade%>" />
-               </div>
-       </div>
-</form>
-<% elseif ret then %>
-       <% if ret == 0 then %>
-<div class="ok"><%:a_s_flash_flashed%></div>
-       <% else %>
-<div class="error"><%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)</div> 
-       <% end %>
-<% else %>
-<div class="error"><%:a_s_flash_notimplemented%></div>
-<% end %>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_uci/apply.htm b/modules/admin-core/luasrc/view/admin_uci/apply.htm
deleted file mode 100644 (file)
index e280947..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:config%></h1>
-<p><%:uci_applied%>:</p>
-<code><%=(changes or "-")%>
-<%=output%></code>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_uci/changes.htm b/modules/admin-core/luasrc/view/admin_uci/changes.htm
deleted file mode 100644 (file)
index f2a8860..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:config%></h1>
-<h2><%:changes%></h2>
-<code><%=changes%></code>
-<form class="inline" method="get" action="<%=controller%>/admin/uci/apply">
-       <input type="submit" value="<%:apply%>" />
-</form>
-<form class="inline" method="get" action="<%=controller%>/admin/uci/revert">
-       <input type="submit" value="<%:revert%>" />
-</form>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_uci/revert.htm b/modules/admin-core/luasrc/view/admin_uci/revert.htm
deleted file mode 100644 (file)
index 7f98a04..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:config%></h1>
-<p><%:uci_reverted%>:</p>
-<code><%=(changes or "-")%></code>
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_wifi/index.htm b/modules/admin-core/luasrc/view/admin_wifi/index.htm
deleted file mode 100644 (file)
index 58281d1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-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$
-
--%>
-<%+header%>
-<h1><%:wifi%></h1>
-<p><%:a_w_wifi1%></p>
-<p><%:a_w_wifi2%></p>
-<p><%:a_w_wifi3%></p>  
-<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/Makefile b/modules/admin-full/Makefile
new file mode 100644 (file)
index 0000000..81a96f6
--- /dev/null
@@ -0,0 +1,2 @@
+include ../../build/config.mk
+include ../../build/module.mk
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/controller/admin/index.lua b/modules/admin-full/luasrc/controller/admin/index.lua
new file mode 100644 (file)
index 0000000..eb58e00
--- /dev/null
@@ -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
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua
new file mode 100644 (file)
index 0000000..8712633
--- /dev/null
@@ -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.network", package.seeall)
+
+function index()
+       require("luci.i18n")
+       local i18n = luci.i18n.translate
+
+       local page  = node("admin", "network")
+       page.target = template("admin_network/index")
+       page.title  = i18n("network", "Netzwerk")  
+       page.order  = 50
+       
+       local page  = node("admin", "network", "vlan")
+       page.target = cbi("admin_network/vlan")
+       page.title  = i18n("a_n_switch", "Switch")
+       page.order  = 10
+       
+       local page  = node("admin", "network", "ifaces")
+       page.target = cbi("admin_network/ifaces")
+       page.title  = i18n("interfaces", "Schnittstellen")
+       page.order  = 20
+       
+       local page  = node("admin", "network", "dhcp")
+       page.target = cbi("admin_network/dhcp")
+       page.title  = "DHCP"
+       page.order  = 30
+       
+       local page  = node("admin", "network", "ptp")
+       page.target = cbi("admin_network/ptp")
+       page.title  = "PPPoE / PPTP"
+       page.order  = 40
+       
+       local page  = node("admin", "network", "routes")
+       page.target = cbi("admin_network/routes")
+       page.title  = i18n("a_n_routes", "Routen")
+       page.order  = 50
+end
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/controller/admin/services.lua b/modules/admin-full/luasrc/controller/admin/services.lua
new file mode 100644 (file)
index 0000000..59defbb
--- /dev/null
@@ -0,0 +1,39 @@
+--[[
+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.services", package.seeall)
+
+function index()
+       luci.i18n.loadc("admin-core")
+       local i18n = luci.i18n.translate
+
+       local page  = node("admin", "services")
+       page.target = template("admin_services/index")
+       page.title  = i18n("services", "Dienste")  
+       page.order  = 40
+       
+       local page  = node("admin", "services", "httpd")
+       page.target = cbi("admin_services/httpd")
+       page.title  = "Busybox HTTPd"
+       page.order  = 10
+       
+       local page  = node("admin", "services", "dropbear")
+       page.target = cbi("admin_services/dropbear")
+       page.title  = "Dropbear SSHd"
+       page.order  = 20
+       
+       local page  = node("admin", "services", "dnsmasq")
+       page.target = cbi("admin_services/dnsmasq")
+       page.title  = "Dnsmasq"
+       page.order  = 30
+end
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/controller/admin/status.lua b/modules/admin-full/luasrc/controller/admin/status.lua
new file mode 100644 (file)
index 0000000..3a0f040
--- /dev/null
@@ -0,0 +1,29 @@
+--[[
+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.status", package.seeall)
+
+function index()
+       luci.i18n.loadc("admin-core")
+       local i18n = luci.i18n.translate
+
+       entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20)
+       entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"))
+       entry({"admin", "status", "routes"}, template("admin_status/routes"), "Routingtabelle", 10)
+       entry({"admin", "status", "iwscan"}, template("admin_status/iwscan"), "WLAN-Scan", 20)
+end
+
+function action_syslog()
+       local syslog = luci.sys.syslog()
+       luci.template.render("admin_status/syslog", {syslog=syslog})
+end
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua
new file mode 100644 (file)
index 0000000..862a741
--- /dev/null
@@ -0,0 +1,221 @@
+--[[
+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.system", package.seeall)
+
+function index()
+       luci.i18n.loadc("admin-core")
+       local i18n = luci.i18n.translate
+       
+       entry({"admin", "system"}, template("admin_system/index"), i18n("system", "System"), 30)
+       entry({"admin", "system", "packages"}, call("action_packages"), i18n("a_s_packages", "Paketverwaltung"), 10)
+       entry({"admin", "system", "packages", "ipkg"}, call("action_ipkg"), i18n("a_s_p_ipkg", "IPKG-Konfiguration"))
+       entry({"admin", "system", "passwd"}, call("action_passwd"), i18n("a_s_changepw", "Passwort ändern"), 20)
+       entry({"admin", "system", "sshkeys"}, call("action_sshkeys"), i18n("a_s_sshkeys", "SSH-Schlüssel"), 30)
+       entry({"admin", "system", "system"}, cbi("admin_system/system"), i18n("system", "System"), 40)
+       entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("a_s_fstab", "Einhängepunkte"), 50)
+       entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash", "Firmwareupgrade"), 60)
+       entry({"admin", "system", "reboot"}, call("action_reboot"), i18n("reboot", "Neu starten"), 70)
+end
+
+function action_editor()
+       local file = luci.http.formvalue("file", "")
+       local data = luci.http.formvalue("data")
+       local err  = nil
+       local msg  = nil
+       local stat = true
+       
+       if file and data then
+               stat, err = luci.fs.writefile(file, data)
+       end
+       
+       if not stat then
+               err = luci.util.split(err, " ")
+               table.remove(err, 1)
+               msg = table.concat(err, " ")
+       end
+       
+       local cnt, err = luci.fs.readfile(file)
+       if cnt then
+               cnt = luci.util.pcdata(cnt)
+       end
+       luci.template.render("admin_system/editor", {fn=file, cnt=cnt, msg=msg})        
+end
+
+function action_ipkg()
+       local file = "/etc/ipkg.conf"
+       local data = luci.http.formvalue("data")
+       local stat = nil
+       local err  = nil
+       
+       if data then
+               stat, err = luci.fs.writefile(file, data)
+       end     
+       
+       local cnt  = luci.fs.readfile(file)     
+       if cnt then
+               cnt = luci.util.pcdata(cnt)
+       end
+       
+       luci.template.render("admin_system/ipkg", {cnt=cnt, msg=err})   
+end
+
+function action_packages()
+       local ipkg = require("luci.model.ipkg")
+       local void = nil
+       local submit = luci.http.formvalue("submit")
+       
+       
+       -- Search query
+       local query = luci.http.formvalue("query")
+       query = (query ~= '') and query or nil
+       
+       
+       -- Packets to be installed
+       local install = submit and luci.http.formvaluetable("install")
+       
+       -- Install from URL
+       local url = luci.http.formvalue("url")
+       if url and url ~= '' and submit then
+               if not install then
+                       install = {}
+               end
+               install[url] = 1
+       end
+       
+       -- Do install
+       if install then
+               for k, v in pairs(install) do
+                       void, install[k] = ipkg.install(k)
+               end
+       end
+       
+       
+       -- Remove packets
+       local remove = submit and luci.http.formvaluetable("remove")
+       if remove then  
+               for k, v in pairs(remove) do
+                       void, remove[k] = ipkg.remove(k)
+               end     
+       end
+       
+       
+       -- Update all packets
+       local update = luci.http.formvalue("update")
+       if update then
+               void, update = ipkg.update()
+       end
+       
+       
+       -- Upgrade all packets
+       local upgrade = luci.http.formvalue("upgrade")
+       if upgrade then
+               void, upgrade = ipkg.upgrade()
+       end
+       
+       
+       -- Package info
+       local info = luci.model.ipkg.info(query)
+       info = info or {}
+       local pkgs = {}
+       
+       -- Sort after status and name
+       for k, v in pairs(info) do
+               local x = 0
+               for i, j in pairs(pkgs) do
+                       local vins = (v.Status and v.Status.installed)
+                       local jins = (j.Status and j.Status.installed)
+                       if vins ~= jins then
+                               if vins then
+                                       break
+                               end
+                       else
+                               if j.Package > v.Package then
+                                       break
+                               end
+                       end
+                       x = i
+               end
+               table.insert(pkgs, x+1, v)
+       end 
+       
+       luci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
+        install=install, remove=remove, update=update, upgrade=upgrade})       
+end
+
+function action_passwd()
+       local p1 = luci.http.formvalue("pwd1")
+       local p2 = luci.http.formvalue("pwd2")
+       local stat = nil
+       
+       if p1 or p2 then
+               if p1 == p2 then
+                       stat = luci.sys.user.setpasswd("root", p1)
+               else
+                       stat = 10
+               end
+       end
+       
+       luci.template.render("admin_system/passwd", {stat=stat})
+end
+
+function action_reboot()
+       local reboot = luci.http.formvalue("reboot")
+       luci.template.render("admin_system/reboot", {reboot=reboot})
+       if reboot then
+               luci.sys.reboot()
+       end
+end
+
+function action_sshkeys()
+       local file = "/etc/dropbear/authorized_keys"
+       local data = luci.http.formvalue("data")
+       local stat = nil
+       local err  = nil
+       
+       if data then
+               stat, err = luci.fs.writefile(file, data)
+       end     
+       
+       local cnt  = luci.fs.readfile(file)     
+       if cnt then
+               cnt = luci.util.pcdata(cnt)
+       end
+       
+       luci.template.render("admin_system/sshkeys", {cnt=cnt, msg=err})        
+end
+
+function action_upgrade()
+       require("luci.model.uci")
+       local ret  = nil
+       local plat = luci.fs.mtime("/lib/upgrade/platform.sh")
+       
+       local image   = luci.http.upload("image")
+       local keepcfg = luci.http.formvalue("keepcfg")
+       
+       if plat and image then
+               local kpattern = nil
+               if keepcfg then
+                       local files = luci.model.uci.get_all("luci", "flash_keep")
+                       if files.luci and files.luci.flash_keep then
+                               kpattern = ""
+                               for k,v in pairs(files.luci.flash_keep) do
+                                       kpattern = kpattern .. " " ..  v
+                               end
+                       end
+               end
+               ret = luci.sys.flash(image, kpattern)
+       end
+       
+       luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret})
+end
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/controller/admin/uci.lua b/modules/admin-full/luasrc/controller/admin/uci.lua
new file mode 100644 (file)
index 0000000..215a13a
--- /dev/null
@@ -0,0 +1,99 @@
+--[[
+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.uci", package.seeall)
+
+function index()
+       local i18n = luci.i18n.translate
+       
+       entry({"admin", "uci"}, nil, i18n("config"))
+       entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"))
+       entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"))
+       entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"))
+end
+
+function convert_changes(changes)
+       local ret = {}
+       for r, tbl in pairs(changes) do
+               for s, os in pairs(tbl) do
+                       for o, v in pairs(os) do
+                               local val, str
+                               if (v == "") then
+                                       str = "-"
+                                       val = ""
+                               else
+                                       str = ""
+                                       val = "="..v
+                               end
+                               str = r.."."..s
+                               if o ~= ".type" then
+                                       str = str.."."..o
+                               end
+                               table.insert(ret, str..val)
+                       end
+               end
+       end
+       return table.concat(ret, "\n")
+end
+
+function action_changes()
+       local changes = convert_changes(luci.model.uci.changes())
+       luci.template.render("admin_uci/changes", {changes=changes})
+end
+
+function action_apply()
+       local changes = luci.model.uci.changes()
+       local output  = ""
+       
+       if changes then
+               local com = {}
+               local run = {}
+               
+               -- Collect files to be applied and commit changes
+               for r, tbl in pairs(changes) do
+                       if r then
+                               luci.model.uci.load(r)
+                               luci.model.uci.commit(r)
+                               luci.model.uci.unload(r)
+                               if luci.config.uci_oncommit and luci.config.uci_oncommit[r] then
+                                       run[luci.config.uci_oncommit[r]] = true
+                               end
+                       end
+               end
+               
+               -- Search for post-commit commands
+               for cmd, i in pairs(run) do
+                       output = output .. cmd .. ":" .. luci.sys.exec(cmd) .. "\n"
+               end
+       end
+       
+       
+       luci.template.render("admin_uci/apply", {changes=convert_changes(changes), output=output})
+end
+
+
+function action_revert()
+       local changes = luci.model.uci.changes()
+       if changes then
+               local revert = {}
+               
+               -- Collect files to be reverted
+               for r, tbl in pairs(changes) do
+                       luci.model.uci.load(r)
+                       luci.model.uci.revert(r)
+                       luci.model.uci.unload(r)
+               end
+       end
+       
+       luci.template.render("admin_uci/revert", {changes=convert_changes(changes)})
+end
diff --git a/modules/admin-full/luasrc/controller/admin/wifi.lua b/modules/admin-full/luasrc/controller/admin/wifi.lua
new file mode 100644 (file)
index 0000000..4bef0b7
--- /dev/null
@@ -0,0 +1,34 @@
+--[[
+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.wifi", package.seeall)
+
+function index()
+       luci.i18n.loadc("admin-core")
+       local i18n = luci.i18n.translate
+
+       local page  = node("admin", "wifi")
+       page.target = template("admin_wifi/index")
+       page.title  = i18n("wifi", "Drahtlos")  
+       page.order  = 60
+       
+       local page  = node("admin", "wifi", "devices")
+       page.target = cbi("admin_wifi/devices")
+       page.title  = i18n("devices", "Geräte")
+       page.order  = 10
+       
+       local page  = node("admin", "wifi", "networks")
+       page.target = cbi("admin_wifi/networks")
+       page.title  = i18n("networks", "Netze")
+       page.order  = 20
+end
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua
new file mode 100644 (file)
index 0000000..3fdccbf
--- /dev/null
@@ -0,0 +1,44 @@
+--[[
+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$
+]]--
+require("luci.config")
+m = Map("luci", translate("webui"), translate("a_i_luci1", 
+ "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden."))
+
+c = m:section(NamedSection, "main", "core", translate("general"))
+
+l = c:option(ListValue, "lang", translate("language"))
+
+local i18ndir = luci.i18n.i18ndir .. "default."
+for k, v in pairs(luci.config.languages) do
+       if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k .. ".lua") then
+               l:value(k, v)
+       end
+end
+
+t = c:option(ListValue, "mediaurlbase", translate("design"))
+for k, v in pairs(luci.config.themes) do
+       if k:sub(1, 1) ~= "." then
+               t:value(v, k)
+       end
+end
+
+u = m:section(NamedSection, "uci_oncommit", "event", translate("a_i_ucicommit"),
+ translate("a_i_ucicommit1"))
+u.dynamic = true
+
+f = m:section(NamedSection, "flash_keep", "extern", translate("a_i_keepflash"),
+ translate("a_i_keepflash1"))
+f.dynamic = true
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
new file mode 100644 (file)
index 0000000..b22f735
--- /dev/null
@@ -0,0 +1,53 @@
+--[[
+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$
+]]--
+require("luci.model.uci")
+require("luci.sys")
+
+m = Map("dhcp", "DHCP")
+
+s = m:section(TypedSection, "dhcp", "")
+s.addremove = true
+s.anonymous = true
+
+iface = s:option(ListValue, "interface", translate("interface"))
+luci.model.uci.foreach("network", "interface",
+       function (section)
+               if section[".name"] ~= "loopback" then
+                       iface:value(section[".name"])
+                       s:depends("interface", section[".name"])
+               end
+       end)
+
+s:option(Value, "start", translate("start")).rmempty = true
+
+s:option(Value, "limit", translate("limit")).rmempty = true
+
+s:option(Value, "leasetime").rmempty = true
+
+s:option(Flag, "dynamicdhcp").rmempty = true
+
+s:option(Value, "name", translate("name")).optional = true
+
+s:option(Flag, "ignore").optional = true
+
+s:option(Value, "netmask", translate("netmask")).optional = true
+
+s:option(Flag, "force").optional = true
+
+for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
+       k, v = line:match("([^ ]+) +([^ ]+)")
+       s:option(Value, "dhcp"..k, v).optional = true
+end
+       
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
new file mode 100644 (file)
index 0000000..2851f3a
--- /dev/null
@@ -0,0 +1,52 @@
+--[[
+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$
+]]--
+m = Map("network", translate("interfaces"), translate("a_n_ifaces1"))
+
+s = m:section(TypedSection, "interface", "")
+s.addremove = true
+s:exclude("loopback")
+s:depends("proto", "static")
+s:depends("proto", "dhcp")
+
+p = s:option(ListValue, "proto", translate("protocol"))
+p:value("static", translate("static"))
+p:value("dhcp", "DHCP")
+p.default = "static"
+
+br = s:option(Flag, "type", translate("a_n_i_bridge"), translate("a_n_i_bridge1"))
+br.enabled = "bridge"
+br.rmempty = true
+
+s:option(Value, "ifname", translate("interface"))
+
+s:option(Value, "ipaddr", translate("ipaddress"))
+
+s:option(Value, "netmask", translate("netmask")):depends("proto", "static")
+
+gw = s:option(Value, "gateway", translate("gateway"))
+gw:depends("proto", "static")
+gw.rmempty = true
+
+dns = s:option(Value, "dns", translate("dnsserver"))
+dns:depends("proto", "static")
+dns.optional = true
+
+mtu = s:option(Value, "mtu", "MTU")
+mtu.optional = true
+mtu.isinteger = true
+
+mac = s:option(Value, "macaddr", translate("macaddress"))
+mac.optional = true
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua
new file mode 100644 (file)
index 0000000..565edb7
--- /dev/null
@@ -0,0 +1,43 @@
+--[[
+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$
+]]--
+m = Map("network", translate("a_n_ptp"), translate("a_n_ptp1"))
+
+s = m:section(TypedSection, "interface", "")
+s.addremove = true
+s:depends("proto", "pppoe")
+s:depends("proto", "pptp")
+
+p = s:option(ListValue, "proto", translate("protocol"))
+p:value("pppoe", "PPPoE")
+p:value("pptp", "PPTP")
+p.default = "pppoe"
+
+s:option(Value, "ifname", translate("interface"))
+
+s:option(Value, "username", translate("username"))
+s:option(Value, "password", translate("password"))
+
+s:option(Value, "keepalive").optional = true
+
+s:option(Value, "demand").optional = true
+
+srv = s:option(Value, "server")
+srv:depends("proto", "pptp")
+srv.optional = true
+
+mtu = s:option(Value, "mtu", "MTU")
+mtu.optional = true
+mtu.isinteger = true
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua b/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua
new file mode 100644 (file)
index 0000000..15f994c
--- /dev/null
@@ -0,0 +1,35 @@
+--[[
+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$
+]]--
+m = Map("network", translate("a_n_routes"), translate("a_n_routes1"))
+
+s = m:section(TypedSection, "route", "")
+s.addremove = true
+s.anonymous = true
+s.template  = "cbi/tblsection"
+
+iface = s:option(ListValue, "interface", translate("interface"))
+luci.model.uci.foreach("network", "interface",
+       function (section)
+               if section[".name"] ~= "loopback" then
+                       iface:value(section[".name"])
+               end
+       end)
+
+s:option(Value, "target", translate("target"), translate("a_n_r_target1"))
+
+s:option(Value, "netmask", translate("netmask"), translate("a_n_r_netmask1")).rmemepty = true
+
+s:option(Value, "gateway", translate("gateway"))
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua
new file mode 100644 (file)
index 0000000..8cae7f9
--- /dev/null
@@ -0,0 +1,22 @@
+--[[
+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$
+]]--
+m = Map("network", translate("a_n_switch"), translate("a_n_switch1"))
+
+s = m:section(TypedSection, "switch", "")
+
+for i = 0, 15 do
+       s:option(Value, "vlan"..i, "vlan"..i).optional = true
+end
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_services/dnsmasq.lua b/modules/admin-full/luasrc/model/cbi/admin_services/dnsmasq.lua
new file mode 100644 (file)
index 0000000..e853064
--- /dev/null
@@ -0,0 +1,42 @@
+--[[
+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$
+]]--
+m = Map("dhcp", "Dnsmasq")
+
+s = m:section(TypedSection, "dnsmasq", translate("settings"))
+s.anonymous = true
+
+s:option(Flag, "domainneeded")
+s:option(Flag, "authoritative")
+s:option(Flag, "boguspriv")
+s:option(Flag, "filterwin2k")
+s:option(Flag, "localise_queries")
+s:option(Value, "local")
+s:option(Value, "domain")
+s:option(Flag, "expandhosts")
+s:option(Flag, "nonegcache")
+s:option(Flag, "readethers")
+s:option(Value, "leasefile")
+s:option(Value, "resolvfile")
+s:option(Flag, "nohosts").optional = true
+s:option(Flag, "strictorder").optional = true
+s:option(Flag, "logqueries").optional = true
+s:option(Flag, "noresolv").optional = true
+s:option(Value, "dnsforwardmax").optional = true
+s:option(Value, "port").optional = true
+s:option(Value, "ednspacket_max").optional = true
+s:option(Value, "dhcpleasemax").optional = true
+s:option(Value, "addnhosts").optional = true
+s:option(Value, "queryport").optional = true
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_services/dropbear.lua b/modules/admin-full/luasrc/model/cbi/admin_services/dropbear.lua
new file mode 100644 (file)
index 0000000..a8ce269
--- /dev/null
@@ -0,0 +1,26 @@
+--[[
+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$
+]]--
+m = Map("dropbear", "Dropbear SSHd", translate("a_srv_dropbear1"))
+
+s = m:section(TypedSection, "dropbear", "")
+s.anonymous = true
+
+port = s:option(Value, "Port", translate("port"))
+port.isinteger = true
+
+pwauth = s:option(Flag, "PasswordAuth", translate("a_srv_d_pwauth"), translate("a_srv_d_pwauth1"))
+pwauth.enabled = 'on'
+pwauth.disabled = 'off'
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_services/httpd.lua b/modules/admin-full/luasrc/model/cbi/admin_services/httpd.lua
new file mode 100644 (file)
index 0000000..44beb9c
--- /dev/null
@@ -0,0 +1,30 @@
+--[[
+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$
+]]--
+m = Map("httpd", "Busybox HTTPd", translate("a_srv_http1"))
+
+s = m:section(TypedSection, "httpd", "")
+s.anonymous = true
+
+port = s:option(Value, "port", translate("port"))
+port.isinteger = true
+
+s:option(Value, "home", translate("a_srv_http_root"))
+
+config = s:option(Value, "c_file", translate("configfile"), translate("a_srv_http_config1"))
+config.rmempty = true
+
+realm = s:option(Value, "realm", translate("a_srv_http_authrealm"), translate("a_srv_http_authrealm1"))
+realm.rmempty = true
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua b/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua
new file mode 100644 (file)
index 0000000..be2562c
--- /dev/null
@@ -0,0 +1,34 @@
+--[[
+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$
+]]--
+m = Map("fstab", translate("a_s_fstab"))
+
+mount = m:section(TypedSection, "mount", translate("a_s_fstab_mountpoints"), translate("a_s_fstab_mountpoints1"))
+mount.anonymous = true
+mount.addremove = true
+
+mount:option(Flag, "enabled", translate("enable"))
+mount:option(Value, "device", translate("device"), translate("a_s_fstab_device1"))
+mount:option(Value, "target", translate("a_s_fstab_mountpoint"))
+mount:option(Value, "fstype", translate("filesystem"), translate("a_s_fstab_fs1"))
+mount:option(Value, "options", translate("options"), translatef("manpage", "siehe '%s' manpage", "mount"))
+
+
+swap = m:section(TypedSection, "swap", "SWAP", translate("a_s_fstab_swap1"))
+swap.anonymous = true
+swap.addremove = true
+
+swap:option(Flag, "enabled", translate("enable"))
+swap:option(Value, "device", translate("device"), translate("a_s_fstab_device1"))
+
+return m
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
new file mode 100644 (file)
index 0000000..dd59d8c
--- /dev/null
@@ -0,0 +1,22 @@
+--[[
+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$
+]]--
+m = Map("system", translate("system"))
+
+s = m:section(TypedSection, "system", "")
+s.anonymous = true
+
+s:option(Value, "hostname", translate("hostname"))
+s:option(Value, "timezone", translate("timezone"))
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
new file mode 100644 (file)
index 0000000..b4e0e29
--- /dev/null
@@ -0,0 +1,64 @@
+--[[
+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$
+]]--
+m = Map("wireless", translate("devices"), translate("a_w_devices1", 
+       "An dieser Stelle können eingebaute WLAN-Geräte konfiguriert werden."))
+
+s = m:section(TypedSection, "wifi-device", "")
+--s.addremove = true
+
+en = s:option(Flag, "disabled", translate("enable"))
+en.enabled = "0"
+en.disabled = "1"
+
+t = s:option(ListValue, "type", translate("type"))
+t:value("broadcom")
+t:value("atheros")
+t:value("mac80211")
+t:value("prism2")
+--[[
+require("luci.sys")
+local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
+for driver in luci.sys.execl(c)[1]:gmatch("[^ ]+") do
+       t:value(driver)
+end
+]]--
+
+mode = s:option(ListValue, "mode", translate("mode"))
+mode:value("", "standard")
+mode:value("11b", "802.11b")
+mode:value("11g", "802.11g")
+mode:value("11a", "802.11a")
+mode:value("11bg", "802.11b+g")
+mode.rmempty = true
+
+s:option(Value, "channel", translate("a_w_channel"))
+
+s:option(Value, "txantenna", translate("a_w_txantenna")).rmempty = true
+
+s:option(Value, "rxantenna", translate("a_w_rxantenna")).rmempty = true
+
+s:option(Value, "distance", translate("distance"),
+       translate("a_w_distance1")).rmempty = true
+
+s:option(Value, "diversity", translate("a_w_diversity")):depends("type", "atheros")
+       
+country = s:option(Value, "country", translate("a_w_countrycode"))
+country.optional = true
+country:depends("type", "broadcom")
+
+maxassoc = s:option(Value, "maxassoc", translate("a_w_connlimit"))
+maxassoc:depends("type", "broadcom")
+maxassoc.optional = true
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
new file mode 100644 (file)
index 0000000..f0379b3
--- /dev/null
@@ -0,0 +1,83 @@
+--[[
+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$
+]]--
+m = Map("wireless", translate("networks"), translate("a_w_networks1"))
+
+s = m:section(TypedSection, "wifi-iface", "")
+s.addremove = true
+s.anonymous = true
+
+s:option(Value, "ssid", translate("a_w_netid")).maxlength = 32
+
+device = s:option(ListValue, "device", translate("device"))
+luci.model.uci.foreach("wireless", "wifi-device",
+       function (section)
+               device:value(section[".name"])
+       end)
+
+network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
+network:value("")
+luci.model.uci.foreach("network", "interface",
+       function (section)
+               if section[".name"] ~= "loopback" then
+                       network:value(section[".name"])
+               end
+       end)
+
+mode = s:option(ListValue, "mode", translate("mode"))
+mode:value("ap", "Access Point")
+mode:value("adhoc", "Ad-Hoc")
+mode:value("sta", "Client")
+mode:value("wds", "WDS")
+
+s:option(Value, "bssid", "BSSID").optional = true
+
+s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true
+
+s:option(Flag, "frameburst", translate("a_w_brcmburst")).optional = true
+s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
+
+
+encr = s:option(ListValue, "encryption", translate("encryption"))
+encr:value("none", "keine")
+encr:value("wep", "WEP")
+encr:value("psk", "WPA-PSK")
+encr:value("wpa", "WPA-Radius")
+encr:value("psk2", "WPA2-PSK")
+encr:value("wpa2", "WPA2-Radius")
+
+key = s:option(Value, "key", translate("key"))
+key:depends("encryption", "wep")
+key:depends("encryption", "psk")
+key:depends("encryption", "wpa")
+key:depends("encryption", "psk2")
+key:depends("encryption", "wpa2")
+key.rmempty = true
+
+server = s:option(Value, "server", translate("a_w_radiussrv"))
+server:depends("encryption", "wpa")
+server:depends("encryption", "wpa2")
+server.rmempty = true
+
+port = s:option(Value, "port", translate("a_w_radiusport"))
+port:depends("encryption", "wpa")
+port:depends("encryption", "wpa2")
+port.rmempty = true
+
+s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")).optional = true
+
+s:option(Flag, "hidden", translate("a_w_hideessid")).optional = true
+
+
+
+return m
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_index/index.htm b/modules/admin-full/luasrc/view/admin_index/index.htm
new file mode 100644 (file)
index 0000000..4ea58c2
--- /dev/null
@@ -0,0 +1,24 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:a_i_i_hello%></h1>
+<p><%:a_i_i_admin1%></p>
+<p><%:a_i_i_admin2%><br />
+<%:a_i_i_admin3%></p>
+<p><%:a_i_i_admin4%></p>
+<p><%:a_i_i_admin5%></p>
+<p><%:a_i_i_admin6%></p>
+<p><em><strong><a href="<%=controller%>/about"><%:a_i_i_team%></a></strong></em></p> 
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_network/index.htm b/modules/admin-full/luasrc/view/admin_network/index.htm
new file mode 100644 (file)
index 0000000..dec2864
--- /dev/null
@@ -0,0 +1,22 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:network%></h1>
+<p><%:a_network1%></p>
+<p><%:a_network2%></p>
+<p><%:a_network3%></p>
+<p><%:a_network4%></p>
+<p><%:a_network5%></p>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_services/index.htm b/modules/admin-full/luasrc/view/admin_services/index.htm
new file mode 100644 (file)
index 0000000..c0bd8b3
--- /dev/null
@@ -0,0 +1,19 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:services%></h1>
+<p><%:a_srv_services1%></p>
+<p><%:a_srv_services2%></p>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_status/index.htm b/modules/admin-full/luasrc/view/admin_status/index.htm
new file mode 100644 (file)
index 0000000..e1f4b0e
--- /dev/null
@@ -0,0 +1,19 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:status%></h1>
+<p><%:a_st_i_status1%></p>
+<p><%:a_st_i_status2%></p> 
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_status/iwscan.htm b/modules/admin-full/luasrc/view/admin_status/iwscan.htm
new file mode 100644 (file)
index 0000000..cbba791
--- /dev/null
@@ -0,0 +1,52 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:iwscan%></h1>
+<p><%:iwscan1%></p>
+
+<br />
+<table cellspacing="0" cellpadding="6" class="smalltext">
+<tr>
+<th><%:interface%></th>
+<th>ESSID</th>
+<th>BSSID</th>
+<th><%:mode%></th>
+<th><%:channel%></th>
+<th><%:iwscan_encr%></th>
+<th><%:iwscan_link%></th>
+<th><%:iwscan_signal%></th>
+<th><%:iwscan_noise%></th>
+</tr>
+<%for iface, cells in pairs(luci.sys.wifi.iwscan()) do
+       for i, cell in ipairs(cells) do 
+%>
+<tr>
+<td><%=iface%></td>
+<td><%=cell.ESSID%></td>
+<td><%=cell.Address%></td>
+<td><%=cell.Mode%></td>
+<td><%=(cell.Channel or cell.Frequency or "")%></td>
+<td><%=cell["Encryption key"]%></td>
+<td><%=cell.Quality%></td>
+<td><%=cell["Signal level"]%></td>
+<td><%=cell["Noise level"]%></td>
+</tr>
+<%
+       end
+end
+%>
+</table>
+<br />
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_status/routes.htm b/modules/admin-full/luasrc/view/admin_status/routes.htm
new file mode 100644 (file)
index 0000000..c4ebf34
--- /dev/null
@@ -0,0 +1,42 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:routes%></h1>
+
+<br />
+<table cellspacing="0" cellpadding="6" class="smalltext">
+<tr>
+<th><%:target%></th>
+<th><%:routes_netmask%></th>
+<th><%:routes_gateway%></th>
+<th><%:routes_metric%></th>
+<th><%:interface%></th>
+</tr>
+<%
+local routes = luci.sys.net.routes()
+
+for i, r in pairs(routes) do
+%>
+<tr>
+<td><%=luci.sys.net.hexip4(r.Destination)%></td>
+<td><%=luci.sys.net.hexip4(r.Mask)%></td>
+<td><%=luci.sys.net.hexip4(r.Gateway)%></td>
+<td><%=r.Metric%></td>
+<td><%=r.Iface%></td>
+</tr>
+<% end %>
+</table>
+<br />
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_status/syslog.htm b/modules/admin-full/luasrc/view/admin_status/syslog.htm
new file mode 100644 (file)
index 0000000..f3d1f0a
--- /dev/null
@@ -0,0 +1,19 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:status%></h1>
+<h2><%:syslog%></h2>
+<code><%=syslog%></code>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/editor.htm b/modules/admin-full/luasrc/view/admin_system/editor.htm
new file mode 100644 (file)
index 0000000..bac1729
--- /dev/null
@@ -0,0 +1,28 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:texteditor%></h1>
+<form method="post" action="<%=controller%>/admin/system/editor">
+<div><%:file%>: <input type="text" name="file" size="30" value="<%=fn%>" />
+<% if msg then %><span class="error"><%:error%>: <%=msg%></span><% end %></div>
+<br />
+<div><textarea style="width: 100%" rows="20" name="data"><%=cnt%></textarea></div>
+<br />
+<div>
+       <input type="submit" value="<%:save%>" />
+       <input type="reset" value="<%:reset%>" />
+</div>
+</form>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/index.htm b/modules/admin-full/luasrc/view/admin_system/index.htm
new file mode 100644 (file)
index 0000000..3138903
--- /dev/null
@@ -0,0 +1,20 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<p><%:a_s_i_system1%></p>
+<p><%:a_s_i_system2%></p> 
+<p><%:a_s_i_system3%></p> 
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/ipkg.htm b/modules/admin-full/luasrc/view/admin_system/ipkg.htm
new file mode 100644 (file)
index 0000000..0cd87d9
--- /dev/null
@@ -0,0 +1,40 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<h2><%:a_s_p_ipkg%></h2>
+
+<br />
+
+<div><strong><%:a_s_p_ipkg_pkglists%>:</strong><code>src <em>Name</em> <em>URL</em></code></div>
+<div><strong><%:a_s_p_ipkg_targets%>:</strong><code>dest <em>Name</em> <em>Pfad</em></code></div>
+
+<br />
+
+<form method="post" action="<%=REQUEST_URI%>">
+       <div class="cbi-section-node" style="width: 100%">
+               <div class="cbi-value">
+                       <div class="cbi-value-field">
+                               <textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea>
+                       </div>
+               </div>
+       </div>
+       <div>
+               <input type="submit" value="<%:save%>" />
+               <input type="reset" value="<%:reset%>" />
+       </div>
+       <% if msg then %><br /><div class="error"><%:error%>: <%=msg%></div><% end %>
+</form>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/packages.htm b/modules/admin-full/luasrc/view/admin_system/packages.htm
new file mode 100644 (file)
index 0000000..0f8f2c1
--- /dev/null
@@ -0,0 +1,91 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<h2><%:a_s_packages%></h2>
+
+<br />
+
+<% if install or remove or update or upgrade then %>
+<div class="code"><strong><%:status%>:</strong><br />
+<% if update then %>
+       <%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=update%>)</span><% end %><br />
+<% end %>
+<% if upgrade then%>
+       <%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=upgrade%>)</span><% end %><br />
+<% end %>
+<% if install then for k,v in pairs(install) do %>
+       <%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
+<% end end %>
+<% if remove then for k,v in pairs(remove) do %>
+       <%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
+<% end end %>
+</div>
+<br />
+<% end %>
+
+<div>
+<a href="<%=controller%>/admin/system/packages/ipkg"><%:a_s_packages_ipkg%></a><br />
+<a href="<%=controller%>/admin/system/packages?update=1"><%:a_s_packages_updatelist%></a><br />
+<a href="<%=controller%>/admin/system/packages?upgrade=1"><%:a_s_packages_upgrade%></a>
+</div>
+
+<br />
+<br />
+
+<form method="post" action="<%=controller%>/admin/system/packages">
+       <div>
+               <span class="bold"><%:a_s_packages_installurl%>:</span><br />
+               <input type="text" name="url" size="30" value="" />
+               <input type="submit" name="submit" value="<%:ok%>" />
+       </div>
+       
+       <br />
+       <br />
+
+       <div>
+               <span class="bold"><%:filter%>:</span>
+               <input type="text" name="query" size="20" value="<%=query%>" />
+               <input type="submit" name="search" value="<%:a_s_packages_search%>" />
+               <input type="submit" name="submit" value="<%:a_s_packages_do%>" />
+       </div>
+       
+       <br />
+       <br />
+       
+       <div>
+       <table style="font-size: 0.8em">
+               <tr>
+                       <th><%:a_s_packages_name%></th>
+                       <th><%:version%></th>
+                       <th><%:install%></th>
+                       <th><%:delete%></th>
+                       <th><%:descr%></th>
+               </tr>
+               <% for k, pkg in pairs(pkgs) do %>      
+               <tr>
+                       <td><%=pkg.Package%></td>
+                       <td><%=pkg.Version%></td>
+                       <td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed%><% end %></td>
+                       <td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled%><% end %></td>
+                       <td><%=pkg.Description%></td>
+               </tr>
+               <% end %>
+       </table>
+       </div>
+       <br />
+       <input type="submit" name="submit" value="<%:a_s_packages_do%>" />
+</form>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/passwd.htm b/modules/admin-full/luasrc/view/admin_system/passwd.htm
new file mode 100644 (file)
index 0000000..176abae
--- /dev/null
@@ -0,0 +1,49 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<h2><%:a_s_changepw%></h2>
+<p><%:a_s_changepw1%></p>
+<div><br />
+<% if stat then %>
+       <% if stat == 0 then %>
+               <code><%:a_s_changepw_changed%>!</code>
+       <% elseif stat == 10 then %>
+               <code class="error"><%:a_s_changepw_nomatch%>!</code>
+       <% else %>
+               <code class="error"><%:unknownerror%>!</code>
+       <% end %>
+<% end %>
+<% if not stat or stat == 10 then %>
+       <form method="post" action="<%=controller%>/admin/system/passwd">
+               <div class="cbi-section-node">
+                       <div class="cbi-value">
+                               <div class="cbi-value-title"><%:password%></div>
+                               <div class="cbi-value-field"><input type="password" name="pwd1" /></div>
+                       </div>
+                       <div class="cbi-value">
+                               <div class="cbi-value-title"><%:confirmation%></div>
+                               <div class="cbi-value-field"><input type="password" name="pwd2" /></div>
+                       </div>
+                       <br />
+                       <div>
+                               <input type="submit" value="<%:save%>" />
+                               <input type="reset" value="<%:reset%>" />
+                       </div>
+               </div>
+       </form>
+<% end %>
+</div>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/reboot.htm b/modules/admin-full/luasrc/view/admin_system/reboot.htm
new file mode 100644 (file)
index 0000000..3ddfa58
--- /dev/null
@@ -0,0 +1,25 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<h2><%:reboot%></h2>
+<p><%:a_s_reboot1%></p>
+<% if not reboot then %>
+<p><a href="<%=controller%>/admin/system/reboot?reboot=1"><%:a_s_reboot_do%></a></p>
+<% else %>
+<p><%:a_s_reboot_running%></p>
+<script type="text/javascript">setTimeout("location='<%=controller%>/admin'", 60000)</script>
+<% end %>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/sshkeys.htm b/modules/admin-full/luasrc/view/admin_system/sshkeys.htm
new file mode 100644 (file)
index 0000000..9a08af9
--- /dev/null
@@ -0,0 +1,39 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<h2><%:a_s_sshkeys%></h2>
+
+<br />
+
+<div><%:a_s_sshkeys1%></div>
+
+<br />
+
+<form method="post" action="<%=controller%>/admin/system/sshkeys">
+       <div class="cbi-section-node" style="width: 100%">
+               <div class="cbi-value">
+                       <div class="cbi-value-field">
+                               <textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea>
+                       </div>
+               </div>
+       </div>
+       <div>
+               <input type="submit" value="<%:save%>" />
+               <input type="reset" value="<%:reset%>" />
+       </div>
+       <% if msg then %><br /><div class="error"><%:error%>: <%=msg%></div><% end %>
+</form>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm
new file mode 100644 (file)
index 0000000..16ba50c
--- /dev/null
@@ -0,0 +1,47 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:system%></h1>
+<h2><%:a_s_flash%></h2>
+<p><%:a_s_flash_upgrade1%></p>
+<br />
+<% if sysupgrade and not ret then %>
+<form method="post" action="<%=luci.http.getenv("REQUEST_URI")%>" enctype="multipart/form-data">
+       <div class="cbi-section-node">
+               <div class="cbi-value clear">
+                       <div class="cbi-value-title left"><%:a_s_flash_fwimage%></div>
+                       <div class="cbi-value-field"><input type="file" size="30" name="image" /></div>
+               </div>
+               <br />
+               <div class="cbi-value clear">
+                       <input type="checkbox" name="keepcfg" value="1" checked="checked" />
+                       <span class="bold"><%:a_s_flash_keepcfg%></span>
+               </div>
+               <br />
+               <div>
+                       <input type="submit" value="<%:a_s_flash_fwupgrade%>" />
+               </div>
+       </div>
+</form>
+<% elseif ret then %>
+       <% if ret == 0 then %>
+<div class="ok"><%:a_s_flash_flashed%></div>
+       <% else %>
+<div class="error"><%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)</div> 
+       <% end %>
+<% else %>
+<div class="error"><%:a_s_flash_notimplemented%></div>
+<% end %>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_uci/apply.htm b/modules/admin-full/luasrc/view/admin_uci/apply.htm
new file mode 100644 (file)
index 0000000..e280947
--- /dev/null
@@ -0,0 +1,20 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:config%></h1>
+<p><%:uci_applied%>:</p>
+<code><%=(changes or "-")%>
+<%=output%></code>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_uci/changes.htm b/modules/admin-full/luasrc/view/admin_uci/changes.htm
new file mode 100644 (file)
index 0000000..f2a8860
--- /dev/null
@@ -0,0 +1,25 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:config%></h1>
+<h2><%:changes%></h2>
+<code><%=changes%></code>
+<form class="inline" method="get" action="<%=controller%>/admin/uci/apply">
+       <input type="submit" value="<%:apply%>" />
+</form>
+<form class="inline" method="get" action="<%=controller%>/admin/uci/revert">
+       <input type="submit" value="<%:revert%>" />
+</form>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_uci/revert.htm b/modules/admin-full/luasrc/view/admin_uci/revert.htm
new file mode 100644 (file)
index 0000000..7f98a04
--- /dev/null
@@ -0,0 +1,19 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:config%></h1>
+<p><%:uci_reverted%>:</p>
+<code><%=(changes or "-")%></code>
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-full/luasrc/view/admin_wifi/index.htm b/modules/admin-full/luasrc/view/admin_wifi/index.htm
new file mode 100644 (file)
index 0000000..58281d1
--- /dev/null
@@ -0,0 +1,20 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+
+-%>
+<%+header%>
+<h1><%:wifi%></h1>
+<p><%:a_w_wifi1%></p>
+<p><%:a_w_wifi2%></p>
+<p><%:a_w_wifi3%></p>  
+<%+footer%>
\ No newline at end of file
diff --git a/modules/admin-mini/Makefile b/modules/admin-mini/Makefile
new file mode 100644 (file)
index 0000000..81a96f6
--- /dev/null
@@ -0,0 +1,2 @@
+include ../../build/config.mk
+include ../../build/module.mk
\ No newline at end of file
diff --git a/modules/admin-mini/luasrc/controller/index.lua b/modules/admin-mini/luasrc/controller/index.lua
new file mode 100644 (file)
index 0000000..eb58e00
--- /dev/null
@@ -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
\ No newline at end of file