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 | |
parent | c6c50b3ec60b284107f459e5923c146d515afd2a (diff) |
Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to Lua Configuration Interface
Diffstat (limited to 'modules')
24 files changed, 135 insertions, 135 deletions
diff --git a/modules/admin-core/src/controller/admin/index.lua b/modules/admin-core/src/controller/admin/index.lua index 89545f1d5..11123c9c9 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 8f11c2848..397f2e4ca 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 cb7c170a0..4dcf837c6 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 1c26257e9..02c3af40b 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 fb108c90a..e44e787fd 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 7443a16b0..ca1440bde 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 922366c54..0da6b7983 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 e14664411..0831b59f0 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 e541d4ec8..bb6bc1820 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 caac277c4..63ef0aa3d 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 ed3838ca5..a2a27eb26 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 8431a8104..a1a197808 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 b612dd676..2931a6e55 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 4a7ad12f6..a5be6f502 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 27cdade52..2e5c7c374 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 52efb4589..43a48e3fc 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> diff --git a/modules/freifunk/src/controller/freifunk/freifunk.lua b/modules/freifunk/src/controller/freifunk/freifunk.lua index 3ff61443d..104f6cdfc 100644 --- a/modules/freifunk/src/controller/freifunk/freifunk.lua +++ b/modules/freifunk/src/controller/freifunk/freifunk.lua @@ -1,4 +1,4 @@ -module("ffluci.controller.freifunk.freifunk", package.seeall) +module("luci.controller.freifunk.freifunk", package.seeall) function index() local page = node() @@ -52,17 +52,17 @@ end function action_status() local data = {} - data.s, data.m, data.r = ffluci.sys.sysinfo() + data.s, data.m, data.r = luci.sys.sysinfo() - data.wifi = ffluci.sys.wifi.getiwconfig() + data.wifi = luci.sys.wifi.getiwconfig() data.routes = {} - for i, r in pairs(ffluci.sys.net.routes()) do + for i, r in pairs(luci.sys.net.routes()) do if r.Destination == "00000000" then table.insert(data.routes, r) end end - ffluci.template.render("public_status/index", data) + luci.template.render("public_status/index", data) end
\ No newline at end of file diff --git a/modules/freifunk/src/controller/freifunk/luciinfo.lua b/modules/freifunk/src/controller/freifunk/luciinfo.lua index bc45898d9..aabab19a1 100644 --- a/modules/freifunk/src/controller/freifunk/luciinfo.lua +++ b/modules/freifunk/src/controller/freifunk/luciinfo.lua @@ -1,28 +1,28 @@ -module("ffluci.controller.freifunk.luciinfo", package.seeall) +module("luci.controller.freifunk.luciinfo", package.seeall) function index() node("freifunk", "luciinfo").target = action_index end function action_index() - local uci = ffluci.model.uci.StateSession() + local uci = luci.model.uci.StateSession() - ffluci.http.prepare_content("text/plain") + luci.http.prepare_content("text/plain") -- General print("luciinfo.api=1") - print("luciinfo.version=" .. tostring(require("ffluci").__version__)) + print("luciinfo.version=" .. tostring(require("luci").__version__)) -- Sysinfo - local s, m, r = ffluci.sys.sysinfo() - local dr = ffluci.sys.net.defaultroute() - dr = dr and ffluci.sys.net.hexip4(dr.Gateway) or "" - local l1, l5, l15 = ffluci.sys.loadavg() + local s, m, r = luci.sys.sysinfo() + local dr = luci.sys.net.defaultroute() + dr = dr and luci.sys.net.hexip4(dr.Gateway) or "" + local l1, l5, l15 = luci.sys.loadavg() print("sysinfo.system=" .. sanitize(s)) print("sysinfo.cpu=" .. sanitize(m)) print("sysinfo.ram=" .. sanitize(r)) - print("sysinfo.hostname=" .. sanitize(ffluci.sys.hostname())) + print("sysinfo.hostname=" .. sanitize(luci.sys.hostname())) print("sysinfo.load1=" .. tostring(l1)) print("sysinfo.load5=" .. tostring(l5)) print("sysinfo.load15=" .. tostring(l15)) diff --git a/modules/freifunk/src/controller/freifunk/olsr.lua b/modules/freifunk/src/controller/freifunk/olsr.lua index 6031cd431..29858fc0e 100644 --- a/modules/freifunk/src/controller/freifunk/olsr.lua +++ b/modules/freifunk/src/controller/freifunk/olsr.lua @@ -1,5 +1,5 @@ -module("ffluci.controller.freifunk.olsr", package.seeall) -require("ffluci.sys") +module("luci.controller.freifunk.olsr", package.seeall) +require("luci.sys") function index() local page = node("freifunk", "olsr") @@ -32,7 +32,7 @@ function action_index() local data = fetch_txtinfo("links") if not data or not data.Links then - ffluci.template.render("freifunk-olsr/error_olsr") + luci.template.render("freifunk-olsr/error_olsr") return nil end @@ -50,14 +50,14 @@ function action_index() table.sort(data.Links, compare) - ffluci.template.render("freifunk-olsr/index", {links=data.Links}) + luci.template.render("freifunk-olsr/index", {links=data.Links}) end function action_routes() local data = fetch_txtinfo("routes") if not data or not data.Routes then - ffluci.template.render("freifunk-olsr/error_olsr") + luci.template.render("freifunk-olsr/error_olsr") return nil end @@ -75,14 +75,14 @@ function action_routes() table.sort(data.Routes, compare) - ffluci.template.render("freifunk-olsr/routes", {routes=data.Routes}) + luci.template.render("freifunk-olsr/routes", {routes=data.Routes}) end function action_topology() local data = fetch_txtinfo("topology") if not data or not data.Topology then - ffluci.template.render("freifunk-olsr/error_olsr") + luci.template.render("freifunk-olsr/error_olsr") return nil end @@ -92,14 +92,14 @@ function action_topology() table.sort(data.Topology, compare) - ffluci.template.render("freifunk-olsr/topology", {routes=data.Topology}) + luci.template.render("freifunk-olsr/topology", {routes=data.Topology}) end function action_hna() local data = fetch_txtinfo("hna") if not data or not data.HNA then - ffluci.template.render("freifunk-olsr/error_olsr") + luci.template.render("freifunk-olsr/error_olsr") return nil end @@ -109,14 +109,14 @@ function action_hna() table.sort(data.HNA, compare) - ffluci.template.render("freifunk-olsr/hna", {routes=data.HNA}) + luci.template.render("freifunk-olsr/hna", {routes=data.HNA}) end function action_mid() local data = fetch_txtinfo("mid") if not data or not data.MID then - ffluci.template.render("freifunk-olsr/error_olsr") + luci.template.render("freifunk-olsr/error_olsr") return nil end @@ -126,14 +126,14 @@ function action_mid() table.sort(data.MID, compare) - ffluci.template.render("freifunk-olsr/mid", {mids=data.MID}) + luci.template.render("freifunk-olsr/mid", {mids=data.MID}) end -- Internal function fetch_txtinfo(otable) otable = otable or "" - local rawdata = ffluci.sys.httpget("http://127.0.0.1:2006/"..otable) + local rawdata = luci.sys.httpget("http://127.0.0.1:2006/"..otable) if #rawdata == 0 then return nil @@ -141,18 +141,18 @@ function fetch_txtinfo(otable) local data = {} - local tables = ffluci.util.split(ffluci.util.trim(rawdata), "\n\n") + local tables = luci.util.split(luci.util.trim(rawdata), "\n\n") for i, tbl in ipairs(tables) do - local lines = ffluci.util.split(tbl, "\n") + local lines = luci.util.split(tbl, "\n") local name = table.remove(lines, 1):sub(8) - local keys = ffluci.util.split(table.remove(lines, 1), "\t") + local keys = luci.util.split(table.remove(lines, 1), "\t") data[name] = {} for j, line in ipairs(lines) do - local fields = ffluci.util.split(line, "\t") + local fields = luci.util.split(line, "\t") data[name][j] = {} for k, key in pairs(keys) do data[name][j][key] = fields[k] diff --git a/modules/freifunk/src/view/freifunk/contact.htm b/modules/freifunk/src/view/freifunk/contact.htm index 221dc89cc..c240916db 100644 --- a/modules/freifunk/src/view/freifunk/contact.htm +++ b/modules/freifunk/src/view/freifunk/contact.htm @@ -1,5 +1,5 @@ <%+header%> -<% local contact = ffluci.model.uci.sections("freifunk").contact %> +<% local contact = luci.model.uci.sections("freifunk").contact %> <h1><%:contact Kontakt%></h1> <table cellspacing="0" cellpadding="6"> <tr><th><%:nickname Pseudonym%>:</th><td><%=contact.nickname%></td></tr> diff --git a/modules/freifunk/src/view/freifunk/index.htm b/modules/freifunk/src/view/freifunk/index.htm index 6c7fe8588..c5ee17b10 100644 --- a/modules/freifunk/src/view/freifunk/index.htm +++ b/modules/freifunk/src/view/freifunk/index.htm @@ -1,8 +1,8 @@ <%+header%> -<% local ff = ffluci.model.uci.sections("freifunk") %> +<% local ff = luci.model.uci.sections("freifunk") %> <h1><%:hellonet Hallo und willkommen im Netz von%> <%=ff.community.name%>!</h1> <p><%:public1 Wir sind eine Initiative zur Schaffung eines freien, offenen und unabhängigen Funknetzwerks auf WLAN-Basis.%><br /> -<%:public2 Dies ist der Zugangspunkt %><%=ffluci.sys.hostname()%>. <%:public3 Er wird betrieben von %> +<%:public2 Dies ist der Zugangspunkt %><%=luci.sys.hostname()%>. <%:public3 Er wird betrieben von %> <a href="<%=controller%>/public/index/contact"><%=ff.contact.nickname%></a>.</p> <p><%:public4 Weitere Informationen zur globalen Freifunkinitiative findest du unter%> <a href="http://freifunk.net">Freifunk.net</a>.<br /> <%:public5 Hast du Interesse an diesem Projekt, dann wende dich an deine lokale Gemeinschaft%> <a href="<%=ff.community.homepage%>"><%=ff.community.name%></a>.</p> diff --git a/modules/freifunk/src/view/public_status/index.htm b/modules/freifunk/src/view/public_status/index.htm index 3ea120c1e..653baf984 100644 --- a/modules/freifunk/src/view/public_status/index.htm +++ b/modules/freifunk/src/view/public_status/index.htm @@ -34,7 +34,7 @@ <th><%:signal Signal%></th> <th><%:noise Rausch%></th> </tr> -<%for k, v in pairs(ffluci.sys.wifi.getiwconfig()) do +<%for k, v in pairs(luci.sys.wifi.getiwconfig()) do %> <tr> <td rowspan="2"><%=k%></td> @@ -68,7 +68,7 @@ for i, rt in pairs(routes) do %> <tr> -<td><%=ffluci.sys.net.hexip4(rt.Gateway)%></th> +<td><%=luci.sys.net.hexip4(rt.Gateway)%></th> <td><%=rt.Metric%></th> <td><%=rt.Iface%></th> </tr> diff --git a/modules/freifunk/src/view/public_status/iwscan.htm b/modules/freifunk/src/view/public_status/iwscan.htm index c5acdb9ac..adba2d23e 100644 --- a/modules/freifunk/src/view/public_status/iwscan.htm +++ b/modules/freifunk/src/view/public_status/iwscan.htm @@ -15,7 +15,7 @@ <th><%:signal Signal%></th> <th><%:noise Rausch%></th> </tr> -<%for iface, cells in pairs(ffluci.sys.wifi.iwscan()) do +<%for iface, cells in pairs(luci.sys.wifi.iwscan()) do for i, cell in ipairs(cells) do %> <tr> diff --git a/modules/freifunk/src/view/public_status/routes.htm b/modules/freifunk/src/view/public_status/routes.htm index 85b02212d..382b8290f 100644 --- a/modules/freifunk/src/view/public_status/routes.htm +++ b/modules/freifunk/src/view/public_status/routes.htm @@ -11,14 +11,14 @@ <th><%:iface Schnittstelle%></th> </tr> <% -local routes = ffluci.sys.net.routes() +local routes = luci.sys.net.routes() for i, r in pairs(routes) do %> <tr> -<td><%=ffluci.sys.net.hexip4(r.Destination)%></td> -<td><%=ffluci.sys.net.hexip4(r.Mask)%></td> -<td><%=ffluci.sys.net.hexip4(r.Gateway)%></td> +<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> |