From f3b7e588e127774e85ebe244ca6ae22d8a8b25e5 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 8 May 2008 16:07:00 +0000 Subject: * WTF SVN oO --- .../freifunk/src/controller/admin/index/wizard.lua | 171 --------------------- modules/freifunk/src/controller/public/index.lua | 1 - modules/freifunk/src/controller/public/olsr.lua | 137 ----------------- modules/freifunk/src/controller/public/status.lua | 21 --- modules/freifunk/src/controller/rpc/luciinfo.lua | 41 ----- modules/freifunk/src/controller/sudo/status.lua | 1 - modules/freifunk/src/i18n/admin_index_contact.en | 11 -- .../freifunk/src/model/cbi/admin_index/contact.lua | 18 --- .../src/model/cbi/admin_index/freifunk.lua | 23 --- modules/freifunk/src/model/menu/10freifunk.lua | 18 --- modules/freifunk/src/view/public_index/contact.htm | 13 -- modules/freifunk/src/view/public_index/index.htm | 11 -- .../freifunk/src/view/public_olsr/error_olsr.htm | 6 - modules/freifunk/src/view/public_olsr/hna.htm | 17 -- modules/freifunk/src/view/public_olsr/index.htm | 43 ------ modules/freifunk/src/view/public_olsr/mid.htm | 17 -- modules/freifunk/src/view/public_olsr/routes.htm | 36 ----- modules/freifunk/src/view/public_olsr/topology.htm | 23 --- modules/freifunk/src/view/public_status/index.htm | 59 ------- modules/freifunk/src/view/public_status/iwscan.htm | 21 --- modules/freifunk/src/view/public_status/routes.htm | 28 ---- modules/freifunk/src/view/sudo_status/iwconfig.htm | 21 --- modules/freifunk/src/view/sudo_status/iwscan.htm | 22 --- 23 files changed, 759 deletions(-) delete mode 100644 modules/freifunk/src/controller/admin/index/wizard.lua delete mode 100644 modules/freifunk/src/controller/public/index.lua delete mode 100644 modules/freifunk/src/controller/public/olsr.lua delete mode 100644 modules/freifunk/src/controller/public/status.lua delete mode 100644 modules/freifunk/src/controller/rpc/luciinfo.lua delete mode 100644 modules/freifunk/src/controller/sudo/status.lua delete mode 100644 modules/freifunk/src/i18n/admin_index_contact.en delete mode 100644 modules/freifunk/src/model/cbi/admin_index/contact.lua delete mode 100644 modules/freifunk/src/model/cbi/admin_index/freifunk.lua delete mode 100644 modules/freifunk/src/model/menu/10freifunk.lua delete mode 100644 modules/freifunk/src/view/public_index/contact.htm delete mode 100644 modules/freifunk/src/view/public_index/index.htm delete mode 100644 modules/freifunk/src/view/public_olsr/error_olsr.htm delete mode 100644 modules/freifunk/src/view/public_olsr/hna.htm delete mode 100644 modules/freifunk/src/view/public_olsr/index.htm delete mode 100644 modules/freifunk/src/view/public_olsr/mid.htm delete mode 100644 modules/freifunk/src/view/public_olsr/routes.htm delete mode 100644 modules/freifunk/src/view/public_olsr/topology.htm delete mode 100644 modules/freifunk/src/view/public_status/index.htm delete mode 100644 modules/freifunk/src/view/public_status/iwscan.htm delete mode 100644 modules/freifunk/src/view/public_status/routes.htm delete mode 100644 modules/freifunk/src/view/sudo_status/iwconfig.htm delete mode 100644 modules/freifunk/src/view/sudo_status/iwscan.htm (limited to 'modules/freifunk/src') diff --git a/modules/freifunk/src/controller/admin/index/wizard.lua b/modules/freifunk/src/controller/admin/index/wizard.lua deleted file mode 100644 index c7064bb1b7..0000000000 --- a/modules/freifunk/src/controller/admin/index/wizard.lua +++ /dev/null @@ -1,171 +0,0 @@ -module("ffluci.controller.admin.index.wizard", package.seeall) - -function action() - if ffluci.http.formvalue("ip") then - return configure_freifunk() - end - - local ifaces = {} - local wldevs = ffluci.model.uci.sections("wireless") - - if wldevs then - for k, v in pairs(wldevs) do - if v[".type"] == "wifi-device" then - table.insert(ifaces, k) - end - end - end - - ffluci.template.render("admin_index/wizard", {ifaces=ifaces}) -end - -function configure_freifunk() - local ip = ffluci.http.formvalue("ip") - local uci = ffluci.model.uci.Session() - - -- Load UCI - uci:t_load("network") - uci:t_load("dhcp") - uci:t_load("freifunk") - uci:t_load("luci_splash") - uci:t_load("olsr") - uci:t_load("wireless") - - - -- Configure FF-Interface - uci:t_del("network", "ff") - uci:t_del("network", "ffdhcp") - - uci:t_set("network", "ff", nil, "interface") - uci:t_set("network", "ff", "type", "bridge") - uci:t_set("network", "ff", "proto", "static") - uci:t_set("network", "ff", "ipaddr", ip) - uci:t_set("network", "ff", "netmask", uci:t_get("freifunk", "community", "mask")) - uci:t_set("network", "ff", "dns", uci:t_get("freifunk", "community", "dns")) - - -- Enable internal routing - uci:t_set("freifunk", "routing", "internal", "1") - - -- Enable internet routing - if ffluci.http.formvalue("shareinet") then - uci:t_set("freifunk", "routing", "internet", "1") - else - uci:t_set("freifunk", "routing", "internet", "0") - end - - -- Configure DHCP - if ffluci.http.formvalue("dhcp") then - local dhcpnet = uci:t_get("freifunk", "community", "dhcp"):match("^([0-9]+)") - local dhcpip = ip:gsub("^[0-9]+", dhcpnet) - - uci:t_set("network", "ffdhcp", nil, "interface") - uci:t_set("network", "ffdhcp", "proto", "static") - uci:t_set("network", "ffdhcp", "ifname", "br-ff:dhcp") - uci:t_set("network", "ffdhcp", "ipaddr", dhcpip) - uci:t_set("network", "ffdhcp", "netmask", uci:t_get("freifunk", "community", "dhcpmask")) - - local dhcp = uci:t_sections("dhcp") - if dhcp then - for k, v in pairs(dhcp) do - if v[".type"] == "dhcp" and v.interface == "ffdhcp" then - uci:t_del("dhcp", k) - end - end - - local dhcpbeg = 48 + tonumber(ip:match("[0-9]+$")) * 4 - - local sk = uci:t_add("dhcp", "dhcp") - uci:t_set("dhcp", sk, "interface", "ffdhcp") - uci:t_set("dhcp", sk, "start", dhcpbeg) - uci:t_set("dhcp", sk, "limit", (dhcpbeg < 252) and 3 or 2) - uci:t_set("dhcp", sk, "leasetime", "30m") - end - - local splash = uci:t_sections("luci_splash") - if splash then - for k, v in pairs(splash) do - if v[".type"] == "iface" then - uci:t_del("luci_splash", k) - end - end - - local sk = uci:t_add("luci_splash", "iface") - uci:t_set("luci_splash", sk, "network", "ffdhcp") - end - end - - -- Configure OLSR - if ffluci.http.formvalue("olsr") and uci:t_sections("olsr") then - for k, v in pairs(uci:t_sections("olsr")) do - if v[".type"] == "Interface" or v[".type"] == "LoadPlugin" then - uci:t_del("olsr", k) - end - end - - if ffluci.http.formvalue("shareinet") then - uci:t_set("olsr", "dyn_gw", nil, "LoadPlugin") - uci:t_set("olsr", "dyn_gw", "Library", "olsrd_dyn_gw.so.0.4") - end - - uci:t_set("olsr", "nameservice", nil, "LoadPlugin") - uci:t_set("olsr", "nameservice", "Library", "olsrd_nameservice.so.0.3") - uci:t_set("olsr", "nameservice", "name", ip:gsub("%.", "-")) - uci:t_set("olsr", "nameservice", "hosts_file", "/var/etc/hosts") - uci:t_set("olsr", "nameservice", "suffix", ".olsr") - uci:t_set("olsr", "nameservice", "latlon_infile", "/tmp/latlon.txt") - - uci:t_set("olsr", "txtinfo", nil, "LoadPlugin") - uci:t_set("olsr", "txtinfo", "Library", "olsrd_txtinfo.so.0.1") - uci:t_set("olsr", "txtinfo", "Accept", "127.0.0.1") - - local oif = uci:t_add("olsr", "Interface") - uci:t_set("olsr", oif, "Interface", "ff") - uci:t_set("olsr", oif, "HelloInterval", "6.0") - uci:t_set("olsr", oif, "HelloValidityTime", "108.0") - uci:t_set("olsr", oif, "TcInterval", "4.0") - uci:t_set("olsr", oif, "TcValidityTime", "324.0") - uci:t_set("olsr", oif, "MidInterval", "18.0") - uci:t_set("olsr", oif, "MidValidityTime", "324.0") - uci:t_set("olsr", oif, "HnaInterval", "18.0") - uci:t_set("olsr", oif, "HnaValidityTime", "108.0") - end - - -- Configure Wifi - local wcfg = uci:t_sections("wireless") - if wcfg then - for iface, v in pairs(wcfg) do - if v[".type"] == "wifi-device" and ffluci.http.formvalue("wifi."..iface) then - -- Cleanup - for k, j in pairs(wcfg) do - if j[".type"] == "wifi-iface" and j.device == iface then - uci:t_del("wireless", k) - end - end - - uci:t_set("wireless", iface, "disabled", "0") - uci:t_set("wireless", iface, "mode", "11g") - uci:t_set("wireless", iface, "txantenna", 1) - uci:t_set("wireless", iface, "rxantenna", 1) - uci:t_set("wireless", iface, "channel", uci:t_get("freifunk", "community", "channel")) - - local wif = uci:t_add("wireless", "wifi-iface") - uci:t_set("wireless", wif, "device", iface) - uci:t_set("wireless", wif, "network", "ff") - uci:t_set("wireless", wif, "mode", "adhoc") - uci:t_set("wireless", wif, "ssid", uci:t_get("freifunk", "community", "essid")) - uci:t_set("wireless", wif, "bssid", uci:t_get("freifunk", "community", "bssid")) - uci:t_set("wireless", wif, "txpower", 13) - end - end - end - - -- Save UCI - uci:t_save("network") - uci:t_save("dhcp") - uci:t_save("freifunk") - uci:t_save("luci_splash") - uci:t_save("olsr") - uci:t_save("wireless") - - ffluci.http.redirect(ffluci.dispatcher.build_url("admin", "uci", "changes")) -end \ No newline at end of file diff --git a/modules/freifunk/src/controller/public/index.lua b/modules/freifunk/src/controller/public/index.lua deleted file mode 100644 index f65478c05f..0000000000 --- a/modules/freifunk/src/controller/public/index.lua +++ /dev/null @@ -1 +0,0 @@ -module("ffluci.controller.public.index", package.seeall) \ No newline at end of file diff --git a/modules/freifunk/src/controller/public/olsr.lua b/modules/freifunk/src/controller/public/olsr.lua deleted file mode 100644 index d41f5ed41d..0000000000 --- a/modules/freifunk/src/controller/public/olsr.lua +++ /dev/null @@ -1,137 +0,0 @@ -module("ffluci.controller.public.olsr", package.seeall) -require("ffluci.sys") - -function action_index() - local data = fetch_txtinfo("links") - - if not data or not data.Links then - ffluci.template.render("public_olsr/error_olsr") - return nil - end - - local function compare(a, b) - if tonumber(a.ETX) == 0 then - return false - end - - if tonumber(b.ETX) == 0 then - return true - end - - return tonumber(a.ETX) < tonumber(b.ETX) - end - - table.sort(data.Links, compare) - - ffluci.template.render("public_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("public_olsr/error_olsr") - return nil - end - - local function compare(a, b) - if tonumber(a.ETX) == 0 then - return false - end - - if tonumber(b.ETX) == 0 then - return true - end - - return tonumber(a.ETX) < tonumber(b.ETX) - end - - table.sort(data.Routes, compare) - - ffluci.template.render("public_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("public_olsr/error_olsr") - return nil - end - - local function compare(a, b) - return a["Destination IP"] < b["Destination IP"] - end - - table.sort(data.Topology, compare) - - ffluci.template.render("public_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("public_olsr/error_olsr") - return nil - end - - local function compare(a, b) - return a.Network < b.Network - end - - table.sort(data.HNA, compare) - - ffluci.template.render("public_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("public_olsr/error_olsr") - return nil - end - - local function compare(a, b) - return a.IP < b.IP - end - - table.sort(data.MID, compare) - - ffluci.template.render("public_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) - - if #rawdata == 0 then - return nil - end - - local data = {} - - local tables = ffluci.util.split(ffluci.util.trim(rawdata), "\n\n") - - - for i, tbl in ipairs(tables) do - local lines = ffluci.util.split(tbl, "\n") - local name = table.remove(lines, 1):sub(8) - local keys = ffluci.util.split(table.remove(lines, 1), "\t") - - data[name] = {} - - for j, line in ipairs(lines) do - local fields = ffluci.util.split(line, "\t") - data[name][j] = {} - for k, key in pairs(keys) do - data[name][j][key] = fields[k] - end - end - end - - return data -end \ No newline at end of file diff --git a/modules/freifunk/src/controller/public/status.lua b/modules/freifunk/src/controller/public/status.lua deleted file mode 100644 index 8d2f7a303f..0000000000 --- a/modules/freifunk/src/controller/public/status.lua +++ /dev/null @@ -1,21 +0,0 @@ -module("ffluci.controller.public.status", package.seeall) - -function action_index() - local data = {} - - data.s, data.m, data.r = ffluci.sys.sysinfo() - - data.wifi = ffluci.sys.wifi.getiwconfig() - - data.routes = {} - for i, r in pairs(ffluci.sys.net.routes()) do - if r.Destination == "00000000" then - table.insert(data.routes, r) - end - end - - - ffluci.template.render("public_status/index", data) -end - - diff --git a/modules/freifunk/src/controller/rpc/luciinfo.lua b/modules/freifunk/src/controller/rpc/luciinfo.lua deleted file mode 100644 index 611423fbb0..0000000000 --- a/modules/freifunk/src/controller/rpc/luciinfo.lua +++ /dev/null @@ -1,41 +0,0 @@ -module("ffluci.controller.rpc.luciinfo", package.seeall) - -function action_index() - local uci = ffluci.model.uci.StateSession() - - ffluci.http.prepare_content("text/plain") - - -- General - print("luciinfo.api=1") - print("luciinfo.version=" .. tostring(ffluci.__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() - - print("sysinfo.system=" .. sanitize(s)) - print("sysinfo.cpu=" .. sanitize(m)) - print("sysinfo.ram=" .. sanitize(r)) - print("sysinfo.hostname=" .. sanitize(ffluci.sys.hostname())) - print("sysinfo.load1=" .. tostring(l1)) - print("sysinfo.load5=" .. tostring(l5)) - print("sysinfo.load15=" .. tostring(l15)) - print("sysinfo.defaultgw=" .. dr) - - - -- Freifunk - local ff = uci:sections("freifunk") or {} - for k, v in pairs(ff) do - if k:sub(1, 1) ~= "." then - for i, j in pairs(v) do - print("freifunk." .. k .. "." .. i .. "=" .. j) - end - end - end -end - -function sanitize(val) - return val:gsub("\n", "\t") -end \ No newline at end of file diff --git a/modules/freifunk/src/controller/sudo/status.lua b/modules/freifunk/src/controller/sudo/status.lua deleted file mode 100644 index fd5127d2cf..0000000000 --- a/modules/freifunk/src/controller/sudo/status.lua +++ /dev/null @@ -1 +0,0 @@ -module("ffluci.controller.sudo.status", package.seeall) \ No newline at end of file diff --git a/modules/freifunk/src/i18n/admin_index_contact.en b/modules/freifunk/src/i18n/admin_index_contact.en deleted file mode 100644 index e2402e91fc..0000000000 --- a/modules/freifunk/src/i18n/admin_index_contact.en +++ /dev/null @@ -1,11 +0,0 @@ -contact1 = [[This information will be available on the public contact page. -As stated in the Picopeering Agreement you should at least enter your e-mail address. -To display your router on any topography map, please enter your geographical coordinates or at least -your street and house number in the location field.]] -nickname = "Nickname" -mail1 = "This field is essential!" -phone = "Phone" -location = "Location" -coord = "Coordinates" -coord1 = "Latitude;Longitude (e.g. 51.5;12.9)" -note = "Note" \ No newline at end of file diff --git a/modules/freifunk/src/model/cbi/admin_index/contact.lua b/modules/freifunk/src/model/cbi/admin_index/contact.lua deleted file mode 100644 index 66a1ec4bde..0000000000 --- a/modules/freifunk/src/model/cbi/admin_index/contact.lua +++ /dev/null @@ -1,18 +0,0 @@ --- Todo: Translate -m = Map("freifunk", translate("contact", "Kontakt"), translate("contact1", [[Diese Daten sind -auf der öffentlichen Kontaktseite sichtbar. Bitte gib an, wie man dich am besten kontaktieren kann. -Diese Informationen sollten nach der Picopeering Vereinbarung mindestens deine E-Mail-Adresse enthalten. -Damit dein Knoten durch Topographieprogramme erfasst werden kann, gib bitte deine Geokoordinaten oder -zumindest deine Straße und Hausnummer unter Standort an.]])) - -c = m:section(NamedSection, "contact", "public") - -c:option(Value, "nickname", translate("nickname", "Pseudonym")) -c:option(Value, "name", translate("name", "Name")) -c:option(Value, "mail", translate("mail", "E-Mail"), translate("mail1", "Bitte unbedingt angeben!")) -c:option(Value, "phone", translate("phone", "Telefon")) -c:option(Value, "location", translate("location", "Standort")) -c:option(Value, "geo", translate("coord", "Koordinaten"), translate("coord1", "Bitte als Breite;Länge (z.B: 51.5;12.9) angeben")) -c:option(Value, "note", translate("note", "Notiz")) - -return m \ No newline at end of file diff --git a/modules/freifunk/src/model/cbi/admin_index/freifunk.lua b/modules/freifunk/src/model/cbi/admin_index/freifunk.lua deleted file mode 100644 index ec4d100b87..0000000000 --- a/modules/freifunk/src/model/cbi/admin_index/freifunk.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Todo: Translate -m = Map("freifunk", "Freifunk") - -s = m:section(NamedSection, "routing", "settings", "Netzverkehr") -s:option(Flag, "internal", "Freifunk zulassen", "immer aktivieren!") -s:option(Flag, "internet", "Internet zulassen") - -c = m:section(NamedSection, "community", "public", "Gemeinschaft", [[Dies sind die Grundeinstellungen -für die lokale Freifunkgemeinschaft. Diese Werte wirken sich NICHT auf die Konfiguration -des Routers aus, sondern definieren nur die Vorgaben für den Freifunkassistenten.]]) -c:option(Value, "name", "Gemeinschaft") -c:option(Value, "homepage", "Webseite") -c:option(Value, "essid", "ESSID") -c:option(Value, "bssid", "BSSID") -c:option(Value, "channel", "Funkkanal") -c:option(Value, "realm", "Realm") -c:option(Value, "net", "Adressbereich") -c:option(Value, "mask", "Netzmaske") -c:option(Value, "dns", "DNS-Server") -c:option(Value, "dhcp", "DHCP-Bereich") -c:option(Value, "dhcpmask", "DHCP-Maske") - -return m \ No newline at end of file diff --git a/modules/freifunk/src/model/menu/10freifunk.lua b/modules/freifunk/src/model/menu/10freifunk.lua deleted file mode 100644 index 3adbe89858..0000000000 --- a/modules/freifunk/src/model/menu/10freifunk.lua +++ /dev/null @@ -1,18 +0,0 @@ -add("public", "index", "Übersicht", 10) -act("contact", "Kontakt") - -add("public", "status", "Status", 20) -act("routes", "Routingtabelle") -act("iwscan", "WLAN-Scan") - -add("public", "olsr", "OLSR", 30) -act("routes", "Routen") -act("topology", "Topologie") -act("hna", "HNA") -act("mid", "MID") - - -sel("admin", "index") -act("wizard", "Freifunkassistent") -act("contact", "Kontakt") -act("freifunk", "Freifunk") \ No newline at end of file diff --git a/modules/freifunk/src/view/public_index/contact.htm b/modules/freifunk/src/view/public_index/contact.htm deleted file mode 100644 index 221dc89ccc..0000000000 --- a/modules/freifunk/src/view/public_index/contact.htm +++ /dev/null @@ -1,13 +0,0 @@ -<%+header%> -<% local contact = ffluci.model.uci.sections("freifunk").contact %> -

<%:contact Kontakt%>

- - - - - - - - -
<%:nickname Pseudonym%>:<%=contact.nickname%>
<%:name Name%>:<%=contact.name%>
<%:mail E-Mail%>:<%=contact.mail%>
<%:phone Telefon%>:<%=contact.phone%>
<%:location Standort%>:<%=contact.location%>
<%:geocoord Geokoordinaten%>:<%=contact.geo%>
<%:note Notiz%>:<%=contact.note%>
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_index/index.htm b/modules/freifunk/src/view/public_index/index.htm deleted file mode 100644 index 6c7fe85883..0000000000 --- a/modules/freifunk/src/view/public_index/index.htm +++ /dev/null @@ -1,11 +0,0 @@ -<%+header%> -<% local ff = ffluci.model.uci.sections("freifunk") %> -

<%:hellonet Hallo und willkommen im Netz von%> <%=ff.community.name%>!

-

<%:public1 Wir sind eine Initiative zur Schaffung eines freien, offenen und unabhängigen Funknetzwerks auf WLAN-Basis.%>
-<%:public2 Dies ist der Zugangspunkt %><%=ffluci.sys.hostname()%>. <%:public3 Er wird betrieben von %> -<%=ff.contact.nickname%>.

-

<%:public4 Weitere Informationen zur globalen Freifunkinitiative findest du unter%> Freifunk.net.
-<%:public5 Hast du Interesse an diesem Projekt, dann wende dich an deine lokale Gemeinschaft%> <%=ff.community.name%>.

-

<%:note Hinweis%>: <%:public6 Der Internetzugang über das experimentelle Freifunknetz ist an technische und organisatorische Bedingungen geknüpft und deshalb möglicherweise -nicht (immer) gewährleistet.%>

-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_olsr/error_olsr.htm b/modules/freifunk/src/view/public_olsr/error_olsr.htm deleted file mode 100644 index 25426f50d7..0000000000 --- a/modules/freifunk/src/view/public_olsr/error_olsr.htm +++ /dev/null @@ -1,6 +0,0 @@ -<%+header%> -

<%:olsr OLSR%>

-

<%:olsrerror1 Es konnte keine Verbindung zum OLSR-Daemon hergestellt werden!%>

-

<%:olsrerror2 Um die Statusinformationen abfragen zu können muss der OLSR-Daemon gestartet -und das Plugin "txtinfo" geladen sein.%>

-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_olsr/hna.htm b/modules/freifunk/src/view/public_olsr/hna.htm deleted file mode 100644 index c13369f426..0000000000 --- a/modules/freifunk/src/view/public_olsr/hna.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%+header%> -

<%:olsrhna OLSR-HNA%>

-
- - - - - -<% for k, route in ipairs(routes) do %> - - - - -<% end %> -
<%:destination Ziel%><%:gateway Gateway%>
<%=route.Network%>/<%=route.Netmask%><%=route.Gateway%>
-
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_olsr/index.htm b/modules/freifunk/src/view/public_olsr/index.htm deleted file mode 100644 index 0633d1f456..0000000000 --- a/modules/freifunk/src/view/public_olsr/index.htm +++ /dev/null @@ -1,43 +0,0 @@ -<%+header%> -

<%:olsrlinks OLSR-Verbindungen%>

-

<%:olsrlinks1 Übersicht über aktuell bestehende OLSR-Verbindungen%>

-
- - - - - - - - -<% for k, link in ipairs(links) do - local color = "#bb3333" - - link.ETX = tonumber(link.ETX) - if link.ETX == 0 then - color = "#bb3333" - elseif link.ETX < 4 then - color = "#00cc00" - elseif link.ETX < 10 then - color = "#ffcb05" - elseif link.ETX < 100 then - color = "#ff6600" - end -%> - - - - - - - -<% end %> -
<%:destination Ziel%><%:local Lokal%>LQNLQETX
"><%=link["remote IP"]%><%=link["Local IP"]%><%=link.LinkQuality%><%=link.NLQ%><%=link.ETX%>
-
-

<%:legend Legende%>:

- -<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_olsr/mid.htm b/modules/freifunk/src/view/public_olsr/mid.htm deleted file mode 100644 index 6553237ea5..0000000000 --- a/modules/freifunk/src/view/public_olsr/mid.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%+header%> -

<%:olsrmid OLSR-MID%>

-
- - - - - -<% for k, mid in ipairs(mids) do %> - - - - -<% end %> -
<%:node Knoten%><%:aliases Aliasse%>
<%=mid.IP%><%=mid.Aliases%>
-
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_olsr/routes.htm b/modules/freifunk/src/view/public_olsr/routes.htm deleted file mode 100644 index f3a0fd3366..0000000000 --- a/modules/freifunk/src/view/public_olsr/routes.htm +++ /dev/null @@ -1,36 +0,0 @@ -<%+header%> -

<%:olsrlinks OLSR-Routen%>

-
- - - - - - - - -<% for k, route in ipairs(routes) do - local color = "#bb3333" - - route.ETX = tonumber(route.ETX) - if route.ETX == 0 then - color = "#bb3333" - elseif route.ETX < 4 then - color = "#00cc00" - elseif route.ETX < 10 then - color = "#ffcb05" - elseif route.ETX < 100 then - color = "#ff6600" - end -%> - - - - - - - -<% end %> -
<%:destination Ziel%><%:gateway Gateway%><%:interface Schnittstelle%><%:metric Metrik%>ETX
<%=route.Destination%><%=route.Gateway%><%=route.Interface%><%=route.Metric%><%=route.ETX%>
-
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_olsr/topology.htm b/modules/freifunk/src/view/public_olsr/topology.htm deleted file mode 100644 index c622026d48..0000000000 --- a/modules/freifunk/src/view/public_olsr/topology.htm +++ /dev/null @@ -1,23 +0,0 @@ -<%+header%> -

<%:olsrtopo OLSR-Topologie%>

-
- - - - - - - - -<% for k, route in ipairs(routes) do %> - - - - - - - -<% end %> -
<%:destination Ziel%><%:lasthop Letzter Router%>LQILQETX
"><%=route["Destination IP"]%>"><%=route["Last hop IP"]%><%=route.LQ%><%=route.ILQ%><%=route.ETX%>
-
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_status/index.htm b/modules/freifunk/src/view/public_status/index.htm deleted file mode 100644 index be0b96888b..0000000000 --- a/modules/freifunk/src/view/public_status/index.htm +++ /dev/null @@ -1,59 +0,0 @@ -<%+header%> -

<%:status Status%>

-

<%:system System%>

- -
- - - - - - - - - - - - - -
<%:system_type Systemtyp%>:<%=s%>
<%:cpu Prozessor%>:<%=m%>
<%:ram Hauptspeicher%>:<%=r%>
-

- -

<%:wifi Drahtlos%>

-
- - - - - - - - - - - - - -<%=ffluci.sys.httpget("http://127.0.0.1" .. controller .. "/sudo/status/iwconfig")%> -
<%:name Name%><%:protocol Protokoll%><%:frequency Frequenz%><%:power Leistung%><%:bitrate Bitrate%><%:rts RTS%><%:frag Frag.%><%:link Verb.%><%:signal Signal%><%:noise Rausch%>
-
-
-

<%:defroutes Standardrouten%>

-
- - - - - - -<% -for i, rt in pairs(routes) do -%> - - -<% end %> -
<%:gateway Gateway%><%:metric Metrik%><%:iface Schnittstelle%>
<%=ffluci.sys.net.hexip4(rt.Gateway)%> -<%=rt.Metric%> -<%=rt.Iface%> -
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_status/iwscan.htm b/modules/freifunk/src/view/public_status/iwscan.htm deleted file mode 100644 index a8924c8925..0000000000 --- a/modules/freifunk/src/view/public_status/iwscan.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%+header%> -

<%:iwscan WLAN-Scan%>

-

<%:iwscan1 Drahtlosnetzwerke in der lokalen Umgebung des Routers:%>

- -
- - - - - - - - - - - - -<%=ffluci.sys.httpget("http://127.0.0.1" .. controller .. "/sudo/status/iwscan")%> -
<%:interface Schnittstelle%><%:essid ESSID%><%:bssid BSSID%><%:mode Modus%><%:channel Kanal%><%:encr Vers.%><%:link Verb.%><%:signal Signal%><%:noise Rausch%>
-
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/public_status/routes.htm b/modules/freifunk/src/view/public_status/routes.htm deleted file mode 100644 index 85b02212d7..0000000000 --- a/modules/freifunk/src/view/public_status/routes.htm +++ /dev/null @@ -1,28 +0,0 @@ -<%+header%> -

<%:routes Routen%>

- -
- - - - - - - - -<% -local routes = ffluci.sys.net.routes() - -for i, r in pairs(routes) do -%> - - - - - - - -<% end %> -
<%:target Ziel%><%:netmask Netzmaske%><%:gateway Gateway%><%:metric Metrik%><%:iface Schnittstelle%>
<%=ffluci.sys.net.hexip4(r.Destination)%><%=ffluci.sys.net.hexip4(r.Mask)%><%=ffluci.sys.net.hexip4(r.Gateway)%><%=r.Metric%><%=r.Iface%>
-
-<%+footer%> \ No newline at end of file diff --git a/modules/freifunk/src/view/sudo_status/iwconfig.htm b/modules/freifunk/src/view/sudo_status/iwconfig.htm deleted file mode 100644 index 6f5dede700..0000000000 --- a/modules/freifunk/src/view/sudo_status/iwconfig.htm +++ /dev/null @@ -1,21 +0,0 @@ -<% -ffluci.http.prepare_content("text/plain") -for k, v in pairs(ffluci.sys.wifi.getiwconfig()) do -%> - -<%=k%> -<%=v[1]%> -<%=v.Frequency%> -<%=v["Tx-Power"]%> -<%=v["Bit Rate"]%> -<%=v["RTS thr"]%> -<%=v["Fragment thr"]%> -<%=v["Link Quality"]%> -<%=v["Signal level"]%> -<%=v["Noise level"]%> - - -ESSID: <%=v.ESSID%> -BSSID: <%=(v.Cell or v["Access Point"])%> - -<%end%> diff --git a/modules/freifunk/src/view/sudo_status/iwscan.htm b/modules/freifunk/src/view/sudo_status/iwscan.htm deleted file mode 100644 index 6f321ae9e2..0000000000 --- a/modules/freifunk/src/view/sudo_status/iwscan.htm +++ /dev/null @@ -1,22 +0,0 @@ -<% -ffluci.http.prepare_content("text/plain") -for iface, cells in pairs(ffluci.sys.wifi.iwscan()) do - for i, cell in ipairs(cells) do -%> - -<%=iface%> -<%=cell.ESSID%> -<%=cell.Address%> -<%=cell.Mode%> -<%=(cell.Channel or cell.Frequency or "")%> -<%=cell["Encryption key"]%> -<%=cell.Quality%> -<%=cell["Signal level"]%> -<%=cell["Noise level"]%> - -<% - end -end -%> - - -- cgit v1.2.3