diff options
author | Steven Barth <steven@midlink.org> | 2008-05-25 17:00:30 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-25 17:00:30 +0000 |
commit | 365d80765d3f08c457b0a373c395c8e1940e44be (patch) | |
tree | 480def5c83ea3df918179e26019cc93e585eda78 /modules/admin-core | |
parent | c6c50b3ec60b284107f459e5923c146d515afd2a (diff) |
Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to Lua Configuration Interface
Diffstat (limited to 'modules/admin-core')
16 files changed, 94 insertions, 94 deletions
diff --git a/modules/admin-core/src/controller/admin/index.lua b/modules/admin-core/src/controller/admin/index.lua index 89545f1d57..11123c9c94 100644 --- a/modules/admin-core/src/controller/admin/index.lua +++ b/modules/admin-core/src/controller/admin/index.lua @@ -1,4 +1,4 @@ -module("ffluci.controller.admin.index", package.seeall) +module("luci.controller.admin.index", package.seeall) function index() local root = node() diff --git a/modules/admin-core/src/controller/admin/network.lua b/modules/admin-core/src/controller/admin/network.lua index 8f11c28489..397f2e4ca3 100644 --- a/modules/admin-core/src/controller/admin/network.lua +++ b/modules/admin-core/src/controller/admin/network.lua @@ -1,4 +1,4 @@ -module("ffluci.controller.admin.network", package.seeall) +module("luci.controller.admin.network", package.seeall) function index() local page = node("admin", "network") @@ -31,7 +31,7 @@ function index() page.title = "Statische Routen" page.order = 50 - if ffluci.fs.isfile("/etc/config/qos") then + if luci.fs.isfile("/etc/config/qos") then local page = node("admin", "network", "qos") page.target = cbi("admin_network/qos") page.title = "Quality of Service" diff --git a/modules/admin-core/src/controller/admin/services.lua b/modules/admin-core/src/controller/admin/services.lua index cb7c170a06..4dcf837c6f 100644 --- a/modules/admin-core/src/controller/admin/services.lua +++ b/modules/admin-core/src/controller/admin/services.lua @@ -1,4 +1,4 @@ -module("ffluci.controller.admin.services", package.seeall) +module("luci.controller.admin.services", package.seeall) function index() local page = node("admin", "services") @@ -21,7 +21,7 @@ function index() page.title = "Dnsmasq" page.order = 30 - if ffluci.fs.isfile("/etc/config/olsr") then + if luci.fs.isfile("/etc/config/olsr") then local page = node("admin", "services", "olsr") page.target = cbi("admin_services/olsrd") page.title = "OLSR" diff --git a/modules/admin-core/src/controller/admin/status.lua b/modules/admin-core/src/controller/admin/status.lua index 1c26257e98..02c3af40b0 100644 --- a/modules/admin-core/src/controller/admin/status.lua +++ b/modules/admin-core/src/controller/admin/status.lua @@ -1,4 +1,4 @@ -module("ffluci.controller.admin.status", package.seeall) +module("luci.controller.admin.status", package.seeall) function index() local page = node("admin", "status") @@ -12,6 +12,6 @@ function index() end function action_syslog() - local syslog = ffluci.sys.syslog() - ffluci.template.render("admin_status/syslog", {syslog=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/src/controller/admin/system.lua b/modules/admin-core/src/controller/admin/system.lua index fb108c90ae..e44e787fd6 100644 --- a/modules/admin-core/src/controller/admin/system.lua +++ b/modules/admin-core/src/controller/admin/system.lua @@ -1,11 +1,11 @@ -module("ffluci.controller.admin.system", package.seeall) +module("luci.controller.admin.system", package.seeall) -require("ffluci.sys") -require("ffluci.http") -require("ffluci.util") -require("ffluci.fs") -require("ffluci.model.ipkg") -require("ffluci.model.uci") +require("luci.sys") +require("luci.http") +require("luci.util") +require("luci.fs") +require("luci.model.ipkg") +require("luci.model.uci") function index() local page = node("admin", "system") @@ -54,63 +54,63 @@ function index() end function action_editor() - local file = ffluci.http.formvalue("file", "") - local data = ffluci.http.formvalue("data") + 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 = ffluci.fs.writefile(file, data) + stat, err = luci.fs.writefile(file, data) end if not stat then - err = ffluci.util.split(err, " ") + err = luci.util.split(err, " ") table.remove(err, 1) msg = table.concat(err, " ") end - local cnt, err = ffluci.fs.readfile(file) + local cnt, err = luci.fs.readfile(file) if cnt then - cnt = ffluci.util.pcdata(cnt) + cnt = luci.util.pcdata(cnt) end - ffluci.template.render("admin_system/editor", {fn=file, cnt=cnt, msg=msg}) + luci.template.render("admin_system/editor", {fn=file, cnt=cnt, msg=msg}) end function action_ipkg() local file = "/etc/ipkg.conf" - local data = ffluci.http.formvalue("data") + local data = luci.http.formvalue("data") local stat = nil local err = nil if data then - stat, err = ffluci.fs.writefile(file, data) + stat, err = luci.fs.writefile(file, data) end - local cnt = ffluci.fs.readfile(file) + local cnt = luci.fs.readfile(file) if cnt then - cnt = ffluci.util.pcdata(cnt) + cnt = luci.util.pcdata(cnt) end - ffluci.template.render("admin_system/ipkg", {cnt=cnt, msg=err}) + luci.template.render("admin_system/ipkg", {cnt=cnt, msg=err}) end function action_packages() - local ipkg = ffluci.model.ipkg + local ipkg = luci.model.ipkg local void = nil - local submit = ffluci.http.formvalue("submit") + local submit = luci.http.formvalue("submit") -- Search query - local query = ffluci.http.formvalue("query") + local query = luci.http.formvalue("query") query = (query ~= '') and query or nil -- Packets to be installed - local install = submit and ffluci.http.formvaluetable("install") + local install = submit and luci.http.formvaluetable("install") -- Install from URL - local url = ffluci.http.formvalue("url") + local url = luci.http.formvalue("url") if url and url ~= '' and submit then if not install then install = {} @@ -127,7 +127,7 @@ function action_packages() -- Remove packets - local remove = submit and ffluci.http.formvaluetable("remove") + local remove = submit and luci.http.formvaluetable("remove") if remove then for k, v in pairs(remove) do void, remove[k] = ipkg.remove(k) @@ -136,21 +136,21 @@ function action_packages() -- Update all packets - local update = ffluci.http.formvalue("update") + local update = luci.http.formvalue("update") if update then void, update = ipkg.update() end -- Upgrade all packets - local upgrade = ffluci.http.formvalue("upgrade") + local upgrade = luci.http.formvalue("upgrade") if upgrade then void, upgrade = ipkg.upgrade() end -- Package info - local info = ffluci.model.ipkg.info(query) + local info = luci.model.ipkg.info(query) info = info or {} local pkgs = {} @@ -174,63 +174,63 @@ function action_packages() table.insert(pkgs, x+1, v) end - ffluci.template.render("admin_system/packages", {pkgs=pkgs, query=query, + luci.template.render("admin_system/packages", {pkgs=pkgs, query=query, install=install, remove=remove, update=update, upgrade=upgrade}) end function action_passwd() - local p1 = ffluci.http.formvalue("pwd1") - local p2 = ffluci.http.formvalue("pwd2") + 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 = ffluci.sys.user.setpasswd("root", p1) + stat = luci.sys.user.setpasswd("root", p1) else stat = 10 end end - ffluci.template.render("admin_system/passwd", {stat=stat}) + luci.template.render("admin_system/passwd", {stat=stat}) end function action_reboot() - local reboot = ffluci.http.formvalue("reboot") - ffluci.template.render("admin_system/reboot", {reboot=reboot}) + local reboot = luci.http.formvalue("reboot") + luci.template.render("admin_system/reboot", {reboot=reboot}) if reboot then - ffluci.sys.reboot() + luci.sys.reboot() end end function action_sshkeys() local file = "/etc/dropbear/authorized_keys" - local data = ffluci.http.formvalue("data") + local data = luci.http.formvalue("data") local stat = nil local err = nil if data then - stat, err = ffluci.fs.writefile(file, data) + stat, err = luci.fs.writefile(file, data) end - local cnt = ffluci.fs.readfile(file) + local cnt = luci.fs.readfile(file) if cnt then - cnt = ffluci.util.pcdata(cnt) + cnt = luci.util.pcdata(cnt) end - ffluci.template.render("admin_system/sshkeys", {cnt=cnt, msg=err}) + luci.template.render("admin_system/sshkeys", {cnt=cnt, msg=err}) end function action_upgrade() local ret = nil - local plat = ffluci.fs.mtime("/lib/upgrade/platform.sh") + local plat = luci.fs.mtime("/lib/upgrade/platform.sh") - local image = ffluci.http.upload("image") - local keepcfg = ffluci.http.formvalue("keepcfg") + 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 = ffluci.model.uci.sections("luci").flash_keep + local files = luci.model.uci.sections("luci").flash_keep if files.luci and files.luci.flash_keep then kpattern = "" for k,v in pairs(files.luci.flash_keep) do @@ -238,8 +238,8 @@ function action_upgrade() end end end - ret = ffluci.sys.flash(image, kpattern) + ret = luci.sys.flash(image, kpattern) end - ffluci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret}) + luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret}) end
\ No newline at end of file diff --git a/modules/admin-core/src/controller/admin/uci.lua b/modules/admin-core/src/controller/admin/uci.lua index 7443a16b0b..ca1440bdee 100644 --- a/modules/admin-core/src/controller/admin/uci.lua +++ b/modules/admin-core/src/controller/admin/uci.lua @@ -1,6 +1,6 @@ -module("ffluci.controller.admin.uci", package.seeall) -require("ffluci.util") -require("ffluci.sys") +module("luci.controller.admin.uci", package.seeall) +require("luci.util") +require("luci.sys") function index() node("admin", "uci", "changes").target = template("admin_uci/changes") @@ -10,7 +10,7 @@ end -- This function has a higher priority than the admin_uci/apply template function action_apply() - local changes = ffluci.model.uci.changes() + local changes = luci.model.uci.changes() local output = "" if changes then @@ -18,39 +18,39 @@ function action_apply() local run = {} -- Collect files to be applied and commit changes - for i, line in ipairs(ffluci.util.split(changes)) do + for i, line in ipairs(luci.util.split(changes)) do local r = line:match("^-?([^.]+)") if r then com[r] = true - if ffluci.config.uci_oncommit and ffluci.config.uci_oncommit[r] then - run[ffluci.config.uci_oncommit[r]] = true + if luci.config.uci_oncommit and luci.config.uci_oncommit[r] then + run[luci.config.uci_oncommit[r]] = true end end end -- Apply for config, i in pairs(com) do - ffluci.model.uci.commit(config) + luci.model.uci.commit(config) end -- Search for post-commit commands for cmd, i in pairs(run) do - output = output .. cmd .. ":" .. ffluci.sys.exec(cmd) .. "\n" + output = output .. cmd .. ":" .. luci.sys.exec(cmd) .. "\n" end end - ffluci.template.render("admin_uci/apply", {changes=changes, output=output}) + luci.template.render("admin_uci/apply", {changes=changes, output=output}) end function action_revert() - local changes = ffluci.model.uci.changes() + local changes = luci.model.uci.changes() if changes then local revert = {} -- Collect files to be reverted - for i, line in ipairs(ffluci.util.split(changes)) do + for i, line in ipairs(luci.util.split(changes)) do local r = line:match("^-?([^.]+)") if r then revert[r] = true @@ -59,9 +59,9 @@ function action_revert() -- Revert them for k, v in pairs(revert) do - ffluci.model.uci.revert(k) + luci.model.uci.revert(k) end end - ffluci.template.render("admin_uci/revert", {changes=changes}) + luci.template.render("admin_uci/revert", {changes=changes}) end
\ No newline at end of file diff --git a/modules/admin-core/src/controller/admin/wifi.lua b/modules/admin-core/src/controller/admin/wifi.lua index 922366c543..0da6b79832 100644 --- a/modules/admin-core/src/controller/admin/wifi.lua +++ b/modules/admin-core/src/controller/admin/wifi.lua @@ -1,4 +1,4 @@ -module("ffluci.controller.admin.wifi", package.seeall) +module("luci.controller.admin.wifi", package.seeall) function index() local page = node("admin", "wifi") diff --git a/modules/admin-core/src/i18n/admin_index.en b/modules/admin-core/src/i18n/admin_index.en index e146644113..0831b59f01 100644 --- a/modules/admin-core/src/i18n/admin_index.en +++ b/modules/admin-core/src/i18n/admin_index.en @@ -1,20 +1,20 @@ luci = "User Interface" hello = "Hello!" -admin1 = "This is the administration area of FFLuCI." -admin2 = "FFLuCI is a free, flexible, and user friendly graphical interface for configuring OpenWRT Kamikaze." +admin1 = "This is the administration area of LuCI." +admin2 = "LuCI is a free, flexible, and user friendly graphical interface for configuring OpenWRT Kamikaze." admin3 = "On the following pages you can adjust all important settings of your router." admin4 = "You will find a navigation leading to the different configuration pages on the left side." admin5 = [[As we are always want to improve this interface we are looking forward to your feedback and suggestions.]] admin6 = "And now have fun with your router!" -team = "The FFLuCI Team" +team = "The LuCI Team" -luci1 = "Here you can customize the settings and the functionality of FFLuCI." +luci1 = "Here you can customize the settings and the functionality of LuCI." language = "Language" general = "General" ucicommit = "Post-commit actions" ucicommit1 = [[These commands will be executed automatically when a given UCI configuration is committed allowing changes to be applied instantly.]] keepflash = "Files to be kept when flashing a new firmware" -keepflash1 = "When flashing a new firmware with FFLuCI these files will be added to the new firmware installation."
\ No newline at end of file +keepflash1 = "When flashing a new firmware with LuCI these files will be added to the new firmware installation."
\ No newline at end of file diff --git a/modules/admin-core/src/model/cbi/admin_index/luci.lua b/modules/admin-core/src/model/cbi/admin_index/luci.lua index e541d4ec87..bb6bc18203 100644 --- a/modules/admin-core/src/model/cbi/admin_index/luci.lua +++ b/modules/admin-core/src/model/cbi/admin_index/luci.lua @@ -1,19 +1,19 @@ -- ToDo: Translate -require("ffluci.config") +require("luci.config") m = Map("luci", translate("luci", "Oberfläche"), translate("luci1", "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden.")) c = m:section(NamedSection, "main", "core", translate("general", "Allgemein")) l = c:option(ListValue, "lang", translate("language", "Sprache")) -for k, v in pairs(ffluci.config.languages) do +for k, v in pairs(luci.config.languages) do if k:sub(1, 1) ~= "." then l:value(k, v) end end t = c:option(ListValue, "mediaurlbase", translate("design", "Design")) -for k, v in pairs(ffluci.config.themes) do +for k, v in pairs(luci.config.themes) do if k:sub(1, 1) ~= "." then t:value(v, k) end diff --git a/modules/admin-core/src/model/cbi/admin_network/dhcp.lua b/modules/admin-core/src/model/cbi/admin_network/dhcp.lua index caac277c45..63ef0aa3d7 100644 --- a/modules/admin-core/src/model/cbi/admin_network/dhcp.lua +++ b/modules/admin-core/src/model/cbi/admin_network/dhcp.lua @@ -1,6 +1,6 @@ -- ToDo: Translate, Add descriptions and help texts -require("ffluci.model.uci") -require("ffluci.sys") +require("luci.model.uci") +require("luci.sys") m = Map("dhcp", "DHCP", [[Mit Hilfe von DHCP können Netzteilnehmer automatisch ihre Netzwerkkonfiguration (IP-Adresse, Netzmaske, DNS-Server, DHCP, ...) beziehen.]]) @@ -10,7 +10,7 @@ s.addremove = true s.anonymous = true iface = s:option(ListValue, "interface", "Schnittstelle") -for k, v in pairs(ffluci.model.uci.sections("network")) do +for k, v in pairs(luci.model.uci.sections("network")) do if v[".type"] == "interface" and k ~= "loopback" then iface:value(k) s:depends("interface", k) -- Only change sections with existing interfaces @@ -33,7 +33,7 @@ s:option(Value, "netmask", "Netzmaske").optional = true s:option(Flag, "force", "Start erzwingen").optional = true -for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do +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 diff --git a/modules/admin-core/src/model/cbi/admin_network/routes.lua b/modules/admin-core/src/model/cbi/admin_network/routes.lua index ed3838ca5b..a2a27eb265 100644 --- a/modules/admin-core/src/model/cbi/admin_network/routes.lua +++ b/modules/admin-core/src/model/cbi/admin_network/routes.lua @@ -9,7 +9,7 @@ s.anonymous = true s.template = "cbi/tblsection" iface = s:option(ListValue, "interface", "Schnittstelle") -for k, v in pairs(ffluci.model.uci.sections("network")) do +for k, v in pairs(luci.model.uci.sections("network")) do if v[".type"] == "interface" and k ~= "loopback" then iface:value(k) end diff --git a/modules/admin-core/src/model/cbi/admin_services/olsrd.lua b/modules/admin-core/src/model/cbi/admin_services/olsrd.lua index 8431a8104b..a1a1978086 100644 --- a/modules/admin-core/src/model/cbi/admin_services/olsrd.lua +++ b/modules/admin-core/src/model/cbi/admin_services/olsrd.lua @@ -1,5 +1,5 @@ -- ToDo: Autodetect things, Translate, Add descriptions -require("ffluci.fs") +require("luci.fs") m = Map("olsr", "OLSR", [[OLSR ist ein flexibles Routingprotokoll, dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]]) @@ -51,7 +51,7 @@ i.dynamic = true network = i:option(ListValue, "Interface", "Netzwerkschnittstellen") network:value("") -for k, v in pairs(ffluci.model.uci.sections("network")) do +for k, v in pairs(luci.model.uci.sections("network")) do if v[".type"] == "interface" and k ~= "loopback" then network:value(k) end @@ -80,7 +80,7 @@ p.dynamic = true lib = p:option(ListValue, "Library", "Bibliothek") lib:value("") -for k, v in pairs(ffluci.fs.dir("/usr/lib")) do +for k, v in pairs(luci.fs.dir("/usr/lib")) do if v:sub(1, 6) == "olsrd_" then lib:value(v) end diff --git a/modules/admin-core/src/model/cbi/admin_wifi/devices.lua b/modules/admin-core/src/model/cbi/admin_wifi/devices.lua index b612dd6766..2931a6e559 100644 --- a/modules/admin-core/src/model/cbi/admin_wifi/devices.lua +++ b/modules/admin-core/src/model/cbi/admin_wifi/devices.lua @@ -15,9 +15,9 @@ t:value("atheros") t:value("mac80211") t:value("prism2") --[[ -require("ffluci.sys") +require("luci.sys") local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS" -for driver in ffluci.sys.execl(c)[1]:gmatch("[^ ]+") do +for driver in luci.sys.execl(c)[1]:gmatch("[^ ]+") do t:value(driver) end ]]-- diff --git a/modules/admin-core/src/model/cbi/admin_wifi/networks.lua b/modules/admin-core/src/model/cbi/admin_wifi/networks.lua index 4a7ad12f6d..a5be6f5028 100644 --- a/modules/admin-core/src/model/cbi/admin_wifi/networks.lua +++ b/modules/admin-core/src/model/cbi/admin_wifi/networks.lua @@ -11,7 +11,7 @@ s.anonymous = true s:option(Value, "ssid", "Netzkennung (ESSID)").maxlength = 32 device = s:option(ListValue, "device", "Gerät") -local d = ffluci.model.uci.sections("wireless") +local d = luci.model.uci.sections("wireless") if d then for k, v in pairs(d) do if v[".type"] == "wifi-device" then @@ -22,7 +22,7 @@ end network = s:option(ListValue, "network", "Netzwerk", "WLAN-Netz zu Netzwerk hinzufügen") network:value("") -for k, v in pairs(ffluci.model.uci.sections("network")) do +for k, v in pairs(luci.model.uci.sections("network")) do if v[".type"] == "interface" and k ~= "loopback" then network:value(k) end diff --git a/modules/admin-core/src/view/admin_index/index.htm b/modules/admin-core/src/view/admin_index/index.htm index 27cdade523..2e5c7c3745 100644 --- a/modules/admin-core/src/view/admin_index/index.htm +++ b/modules/admin-core/src/view/admin_index/index.htm @@ -1,11 +1,11 @@ <%+header%> <h1><%:hello Hallo!%></h1> -<p><%:admin1 Dies ist der Administrationsbereich von FFLuCI.%></p> -<p><%:admin2 FFLuCI ist eine freie, flexible und benutzerfreundliche grafische Oberfläche zur Konfiguration von OpenWRT Kamikaze.%><br /> +<p><%:admin1 Dies ist der Administrationsbereich von LuCI.%></p> +<p><%:admin2 LuCI ist eine freie, flexible und benutzerfreundliche grafische Oberfläche zur Konfiguration von OpenWRT Kamikaze.%><br /> <%:admin3 Auf den folgenden Seiten können alle wichtigen Einstellungen des Routers vorgenommen werden.%></p> <p><%:admin4 Auf der linken Seite befindet sich eine Navigation, die zu den einzelnen Konfigurationsseiten führt.%></p> <p><%:admin5 Wir sind natürlich stets darum bemüht, diese Oberfläche noch besser und intuitiver zu Gestalten und freuen uns über jegliche Art von Feedback oder Verbesserungsvorschlägen.%></p> <p><%:admin6 Und nun wünschen wir viel Spaß mit dem Router!%></p> -<p><em><strong><a href="http://luci.freifunk-halle.net"><%:team Das FFLuCI-Team%></a></strong></em></p> +<p><em><strong><a href="http://luci.freifunk-halle.net"><%:team Das LuCI-Team%></a></strong></em></p> <%+footer%>
\ No newline at end of file diff --git a/modules/admin-core/src/view/admin_uci/changes.htm b/modules/admin-core/src/view/admin_uci/changes.htm index 52efb45890..43a48e3fcb 100644 --- a/modules/admin-core/src/view/admin_uci/changes.htm +++ b/modules/admin-core/src/view/admin_uci/changes.htm @@ -1,7 +1,7 @@ <%+header%> <h1><%:config Konfiguration%></h1> <h2><%:changes Änderungen%></h2> -<code><%=ffluci.model.uci.changes()%></code> +<code><%=luci.model.uci.changes()%></code> <form class="inline" method="get" action="<%=controller%>/admin/uci/apply"> <input type="submit" value="<%:apply Anwenden%>" /> </form> |