diff options
Diffstat (limited to 'modules/admin-full')
40 files changed, 1692 insertions, 0 deletions
diff --git a/modules/admin-full/Makefile b/modules/admin-full/Makefile new file mode 100644 index 0000000000..81a96f6a83 --- /dev/null +++ b/modules/admin-full/Makefile @@ -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 index 0000000000..eb58e00422 --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/index.lua @@ -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 index 0000000000..871263334a --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/network.lua @@ -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 index 0000000000..59defbbbdf --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/services.lua @@ -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 index 0000000000..3a0f040747 --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/status.lua @@ -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 index 0000000000..862a741cde --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -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 index 0000000000..215a13a34b --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/uci.lua @@ -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 index 0000000000..4bef0b7a52 --- /dev/null +++ b/modules/admin-full/luasrc/controller/admin/wifi.lua @@ -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 index 0000000000..3fdccbf802 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua @@ -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 index 0000000000..b22f7354ae --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua @@ -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 index 0000000000..2851f3ad54 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -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 index 0000000000..565edb7fd7 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua @@ -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 index 0000000000..15f994c160 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua @@ -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 index 0000000000..8cae7f94b8 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -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 index 0000000000..e853064715 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_services/dnsmasq.lua @@ -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 index 0000000000..a8ce2694a5 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_services/dropbear.lua @@ -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 index 0000000000..44beb9c9ef --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_services/httpd.lua @@ -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 index 0000000000..be2562ca0f --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua @@ -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 index 0000000000..dd59d8c010 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua @@ -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 index 0000000000..b4e0e2915b --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua @@ -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 index 0000000000..f0379b3708 --- /dev/null +++ b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua @@ -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 index 0000000000..4ea58c2b8a --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_index/index.htm @@ -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 index 0000000000..dec286436c --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_network/index.htm @@ -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 index 0000000000..c0bd8b361f --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_services/index.htm @@ -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 index 0000000000..e1f4b0e53b --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_status/index.htm @@ -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 index 0000000000..cbba791e65 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_status/iwscan.htm @@ -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 index 0000000000..c4ebf347a8 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_status/routes.htm @@ -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 index 0000000000..f3d1f0a963 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_status/syslog.htm @@ -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 index 0000000000..bac1729d04 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/editor.htm @@ -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 index 0000000000..3138903c48 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/index.htm @@ -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 index 0000000000..0cd87d990b --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/ipkg.htm @@ -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 index 0000000000..0f8f2c16eb --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/packages.htm @@ -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 index 0000000000..176abaea20 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/passwd.htm @@ -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 index 0000000000..3ddfa5880e --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/reboot.htm @@ -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 index 0000000000..9a08af9e3b --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/sshkeys.htm @@ -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 index 0000000000..16ba50cd98 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm @@ -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 index 0000000000..e280947282 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_uci/apply.htm @@ -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 index 0000000000..f2a88602ad --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_uci/changes.htm @@ -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 index 0000000000..7f98a0435b --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_uci/revert.htm @@ -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 index 0000000000..58281d14f9 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_wifi/index.htm @@ -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 |