summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk/src
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-25 17:00:30 +0000
committerSteven Barth <steven@midlink.org>2008-05-25 17:00:30 +0000
commit365d80765d3f08c457b0a373c395c8e1940e44be (patch)
tree480def5c83ea3df918179e26019cc93e585eda78 /modules/freifunk/src
parentc6c50b3ec60b284107f459e5923c146d515afd2a (diff)
Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to Lua Configuration Interface
Diffstat (limited to 'modules/freifunk/src')
-rw-r--r--modules/freifunk/src/controller/freifunk/freifunk.lua10
-rw-r--r--modules/freifunk/src/controller/freifunk/luciinfo.lua18
-rw-r--r--modules/freifunk/src/controller/freifunk/olsr.lua34
-rw-r--r--modules/freifunk/src/view/freifunk/contact.htm2
-rw-r--r--modules/freifunk/src/view/freifunk/index.htm4
-rw-r--r--modules/freifunk/src/view/public_status/index.htm4
-rw-r--r--modules/freifunk/src/view/public_status/iwscan.htm2
-rw-r--r--modules/freifunk/src/view/public_status/routes.htm8
8 files changed, 41 insertions, 41 deletions
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>