From a93f0d30ab6a4c36857e0da60a6df3b5a97719a7 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Sun, 23 Aug 2009 15:26:15 +0000 Subject: [PATCH] openwrt: solves the wifi status table updates, LuCI itf cleanup --- openwrt/files/etc/config/system | 1 + openwrt/packages/luci/host/etc/config/luci | 2 +- openwrt/packages/luci/host/usr/bin/boa | Bin 82281 -> 82281 bytes .../packages/luci/host/usr/bin/boa_indexer | Bin 11434 -> 11434 bytes openwrt/packages/luci/host/usr/bin/lucittpd | Bin 24930 -> 24930 bytes openwrt/packages/luci/host/usr/bin/uci | Bin 16410 -> 16410 bytes .../lib/lua/luci/controller/mini/system.lua | 108 +---------- .../usr/lib/lua/luci/i18n/admin-core.en.lua | 7 +- .../lib/lua/luci/model/cbi/mini/network.lua | 53 +----- .../lib/lua/luci/model/cbi/mini/system.lua | 172 ++++++++++++++++- .../usr/lib/lua/luci/model/cbi/mini/wifi.lua | 90 +-------- .../lua/luci/view/themes/oxygen/footer.htm | 2 +- .../host/www/luci-static/oxygen/dashboard.css | 81 +------- .../host/www/luci-static/oxygen/flukso.png | Bin 1830 -> 1612 bytes .../luci/host/www/luci/splash/index.html | 4 +- .../english/luasrc/i18n/admin-core.en.lua | 12 +- .../i18n/english/luasrc/i18n/default.en.lua | 2 +- .../luci/i18n/english/luasrc/i18n/wifi.en.lua | 2 +- .../luasrc/controller/mini/index.lua | 11 -- .../luasrc/controller/mini/network.lua | 6 +- .../luasrc/controller/mini/system.lua | 108 +---------- .../luasrc/model/cbi/mini/network.lua | 55 +----- .../luasrc/model/cbi/mini/system.lua | 175 +++++++++++++++++- .../admin-mini/luasrc/model/cbi/mini/wifi.lua | 103 +---------- .../htdocs/luci-static/oxygen/dashboard.css | 6 +- .../luci-static/oxygen/icons/system.png | Bin 0 -> 6984 bytes 26 files changed, 373 insertions(+), 627 deletions(-) create mode 100644 openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/system.png diff --git a/openwrt/files/etc/config/system b/openwrt/files/etc/config/system index 5c36d60..bbc17e1 100644 --- a/openwrt/files/etc/config/system +++ b/openwrt/files/etc/config/system @@ -1,4 +1,5 @@ config system + option timezone UTC option hostname flukso option device 0123456789abcdef0123456789abcdef option key 00112233445566778899aabbccddeeff diff --git a/openwrt/packages/luci/host/etc/config/luci b/openwrt/packages/luci/host/etc/config/luci index c890105..843a7fe 100644 --- a/openwrt/packages/luci/host/etc/config/luci +++ b/openwrt/packages/luci/host/etc/config/luci @@ -1,8 +1,8 @@ config 'core' 'main' option 'lang' 'auto' + option 'mediaurlbase' '/luci-static/openwrt.org' option 'resourcebase' '/luci-static/resources' - option 'mediaurlbase' '/luci-static/oxygen' config 'extern' 'flash_keep' option 'uci' '/etc/config/' diff --git a/openwrt/packages/luci/host/usr/bin/boa b/openwrt/packages/luci/host/usr/bin/boa index 271e5a167b3281cfbbdd96a34f99f75e0fe37ed9..55594dfa074933ab94a45bf36bbcf418e951cfc7 100755 GIT binary patch delta 205 zcmaFa#QL&{b%WeTamUhh1tTK`BLf3Vg~SpCLo+KwLn~9$&88p!u`!xVe(+s$P?Eu5 MSLtp(|7Vs90INq^egFUf delta 205 zcmaFa#QL&{b%WeTaj()m1w#u3BLf3Vg~SpCLlY}gGb>}W&88p!u`wD?e(+s$P?Eu5 MSLtp(|7Vs90JZg7egFUf diff --git a/openwrt/packages/luci/host/usr/bin/boa_indexer b/openwrt/packages/luci/host/usr/bin/boa_indexer index 1114e26d693ac9827bfcadf6dec80fc7ae6ce250..c85702606ff4a8a787555d232948872519b73360 100755 GIT binary patch delta 36 icmZ1#xhir)xfr9#WCd|eBvN/dev/null 2>&1]]) == 0 - local restore_cmd = "gunzip | tar -xC/ >/dev/null 2>&1" - local backup_cmd = "tar -c %s | gzip 2>/dev/null" - - local restore_fpi - luci.http.setfilehandler( - function(meta, chunk, eof) - if not restore_fpi then - restore_fpi = io.popen(restore_cmd, "w") - end - if chunk then - restore_fpi:write(chunk) - end - if eof then - restore_fpi:close() - end - end - ) - - local upload = luci.http.formvalue("archive") - local backup = luci.http.formvalue("backup") - local reset = reset_avail and luci.http.formvalue("reset") - - if upload and #upload > 0 then - luci.template.render("mini/applyreboot") - luci.sys.reboot() - elseif backup then - luci.util.perror(backup_cmd:format(_keep_pattern())) - local backup_fpi = io.popen(backup_cmd:format(_keep_pattern()), "r") - luci.http.header('Content-Disposition', 'attachment; filename="backup-%s-%s.tar.gz"' % { - luci.sys.hostname(), os.date("%Y-%m-%d")}) - luci.http.prepare_content("application/x-targz") - luci.ltn12.pump.all(luci.ltn12.source.file(backup_fpi), luci.http.write) - elseif reset then - luci.template.render("mini/applyreboot") - luci.util.exec("mtd -r erase rootfs_data") - else - luci.template.render("mini/backup", {reset_avail = reset_avail}) - end -end - -function action_reboot() - local reboot = luci.http.formvalue("reboot") - luci.template.render("mini/reboot", {reboot=reboot}) - if reboot then - luci.sys.reboot() - end -end - -function action_upgrade() - require("luci.model.uci") - - local ret = nil - local plat = luci.fs.mtime("/lib/upgrade/platform.sh") - local tmpfile = "/tmp/firmware.img" - local keep_avail = true - - local file - luci.http.setfilehandler( - function(meta, chunk, eof) - if not file then - file = io.open(tmpfile, "w") - end - if chunk then - file:write(chunk) - end - if eof then - file:close() - end - end - ) - - local fname = luci.http.formvalue("image") - local keepcfg = keep_avail and luci.http.formvalue("keepcfg") - - if plat and fname then - ret = function() - return luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) - end - end - - luci.http.prepare_content("text/html") - luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) -end - -function _keep_pattern() - local kpattern = "" - local files = luci.model.uci.cursor():get_all("luci", "flash_keep") - if files then - kpattern = "" - for k, v in pairs(files) do - if k:sub(1,1) ~= "." and luci.fs.glob(v) then - kpattern = kpattern .. " " .. v - end - end - end - return kpattern -end diff --git a/openwrt/packages/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua b/openwrt/packages/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua index cb2aa4e..7decbfe 100644 --- a/openwrt/packages/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua +++ b/openwrt/packages/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua @@ -21,8 +21,8 @@ a_i_keepflash = 'Files to be kept when flashing a new firmware' a_i_keepflash1 = 'When flashing a new firmware with LuCI these files will be added to the new firmware installation.' a_st_i_status1 = 'Here you can find information about the current system status like CPU clock frequency, memory usage or network interface data.' a_st_i_status2 = 'Also kernel or service logfiles can be viewed here to get an overview over their current state.' -iwscan = 'WLAN-Scan' -iwscan1 = 'Wifi networks in your local environment' +iwscan = 'Wifi-Scan' +iwscan1 = 'Wifi networks detected by this Fluksometer' iwscan_encr = 'Encr.' iwscan_link = 'Link' iwscan_signal = 'Signal' @@ -247,9 +247,10 @@ system_system_logsize = 'System log buffer size' system_system_logip = 'External system log server' system_system_conloglevel = 'Log output level' system_system_conloglevel_desc = 'Level of log messages on the console' +m_i_chipset = 'Chipset' m_i_processor = 'Processor' m_i_memory = 'Memory' -m_i_systemtime = 'Local Time' +m_i_systemtime = 'System Time [UTC]' m_i_uptime = 'Uptime' m_n_d_firstaddress = 'First leased address' m_n_d_numleases = 'Number of leased addresses' diff --git a/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua b/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua index 3cbc86c..884d3d2 100644 --- a/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua +++ b/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua @@ -32,57 +32,6 @@ for k, v in pairs(network) do end m = Map("network", translate("network")) -s = m:section(Table, ifaces, translate("status")) -s.parse = function() end - -s:option(DummyValue, ".name", translate("network")) - -hwaddr = s:option(DummyValue, "_hwaddr", - translate("network_interface_hwaddr"), translate("network_interface_hwaddr_desc")) -function hwaddr.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") or "" - return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") - or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") - or "n/a" -end - - -s:option(DummyValue, "ipaddr", translate("ipaddress")) - -s:option(DummyValue, "netmask", translate("netmask")) - - -txrx = s:option(DummyValue, "_txrx", - translate("network_interface_txrx"), translate("network_interface_txrx_desc")) - -function txrx.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][1] - rx = rx and luci.tools.webadmin.byte_format(tonumber(rx)) or "-" - - local tx = netstat and netstat[ix] and netstat[ix][9] - tx = tx and luci.tools.webadmin.byte_format(tonumber(tx)) or "-" - - return string.format("%s / %s", tx, rx) -end - -errors = s:option(DummyValue, "_err", - translate("network_interface_err"), translate("network_interface_err_desc")) - -function errors.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][3] - local tx = netstat and netstat[ix] and netstat[ix][11] - - rx = rx and tostring(rx) or "-" - tx = tx and tostring(tx) or "-" - - return string.format("%s / %s", tx, rx) -end - - s = m:section(NamedSection, "lan", "interface", translate("m_n_local")) s.addremove = false @@ -105,7 +54,7 @@ p = s:option(ListValue, "proto", translate("protocol")) p.override_values = true p:value("none", "disabled") p:value("static", translate("manual", "manual")) -p:value("dhcp", translate("automatic", "automatic")) +p:value("dhcp", translate("automatic", "DHCP")) if has_pppoe then p:value("pppoe", "PPPoE") end if has_pptp then p:value("pptp", "PPTP") end diff --git a/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua b/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua index 6ab7d0d..acac6d8 100644 --- a/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua +++ b/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua @@ -17,9 +17,9 @@ require("luci.sys.zoneinfo") require("luci.tools.webadmin") -m = Map("system", translate("system"), translate("a_s_desc")) +m = Map("system", translate("system"), "") -s = m:section(TypedSection, "system", "") +s = m:section(TypedSection, "system", translate("general")) s.anonymous = true @@ -27,7 +27,7 @@ s.anonymous = true local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo() local uptime = luci.sys.uptime() -s:option(DummyValue, "_system", translate("system")).value = system +s:option(DummyValue, "_chipset", translate("m_i_chipset")).value = system s:option(DummyValue, "_cpu", translate("m_i_processor")).value = model local load1, load5, load15 = luci.sys.loadavg() @@ -49,7 +49,169 @@ s:option(DummyValue, "_systime", translate("m_i_systemtime")).value = s:option(DummyValue, "_uptime", translate("m_i_uptime")).value = luci.tools.webadmin.date_format(tonumber(uptime)) - -s:option(DummyValue, "hostname", translate("hostname")) + +-- Wifi Data init -- +local uci = luci.model.uci.cursor() +if not uci:get("network", "wan") then + uci:section("network", "interface", "wan", {proto="none", ifname=" "}) + uci:save("network") + uci:commit("network") +end + +local wlcursor = luci.model.uci.cursor_state() +local wireless = wlcursor:get_all("wireless") +local wifidata = luci.sys.wifi.getiwconfig() +local wifidevs = {} +local ifaces = {} + +for k, v in pairs(wireless) do + if v[".type"] == "wifi-iface" then + table.insert(ifaces, v) + end +end + +wlcursor:foreach("wireless", "wifi-device", + function(section) + table.insert(wifidevs, section[".name"]) + end) + + +-- Wifi Status Table -- +s = m:section(Table, ifaces, translate("wifi")) + +link = s:option(DummyValue, "_link", translate("link")) +function link.cfgvalue(self, section) + local ifname = self.map:get(section, "ifname") + return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" +end + +essid = s:option(DummyValue, "ssid", "ESSID") + +bssid = s:option(DummyValue, "_bsiid", "BSSID") +function bssid.cfgvalue(self, section) + local ifname = self.map:get(section, "ifname") + return (wifidata[ifname] and (wifidata[ifname].Cell + or wifidata[ifname]["Access Point"])) or "-" +end + +protocol = s:option(DummyValue, "_mode", translate("protocol")) +function protocol.cfgvalue(self, section) + local mode = wireless[self.map:get(section, "device")].mode + return mode and "802." .. mode +end + +mode = s:option(DummyValue, "mode", translate("mode")) +encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) + +power = s:option(DummyValue, "_power", translate("power")) +function power.cfgvalue(self, section) + local ifname = self.map:get(section, "ifname") + return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" +end + +scan = s:option(Button, "_scan", translate("scan")) +scan.inputstyle = "find" + +function scan.cfgvalue(self, section) + return self.map:get(section, "ifname") or false +end + +-- Wifi-Scan-Table -- +t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) + +function scan.write(self, section) + m.autoapply = false + t2.render = t2._render + local ifname = self.map:get(section, "ifname") + luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) +end + +t2._render = t2.render +t2.render = function() end + +t2:option(DummyValue, "Quality", translate("iwscan_link")) +essid = t2:option(DummyValue, "ESSID", "ESSID") +function essid.cfgvalue(self, section) + return self.map:get(section, "ESSID") +end + +t2:option(DummyValue, "Address", "BSSID") +t2:option(DummyValue, "Mode", translate("mode")) +chan = t2:option(DummyValue, "channel", translate("channel")) +function chan.cfgvalue(self, section) + return self.map:get(section, "Channel") + or self.map:get(section, "Frequency") + or "-" +end + +t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) + +t2:option(DummyValue, "Signal level", translate("iwscan_signal")) + +t2:option(DummyValue, "Noise level", translate("iwscan_noise")) + +-- Interface Data Init-- +local network = luci.model.uci.cursor_state():get_all("network") + +local netstat = luci.sys.net.deviceinfo() +local ifaces = {} + +for k, v in pairs(network) do + if v[".type"] == "interface" and k ~= "loopback" then + table.insert(ifaces, v) + end +end + +-- Interfaces Status Table-- +s = m:section(Table, ifaces, translate("interfaces")) +s.parse = function() end + +s:option(DummyValue, ".name", translate("interface")) + +hwaddr = s:option(DummyValue, "_hwaddr", + translate("network_interface_hwaddr"), translate("network_interface_hwaddr_desc")) +function hwaddr.cfgvalue(self, section) + local ix = self.map:get(section, "ifname") or "" + return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") + or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") + or "n/a" +end + + +s:option(DummyValue, "ipaddr", translate("ipaddress")) + +s:option(DummyValue, "netmask", translate("netmask")) + + +txrx = s:option(DummyValue, "_txrx", + translate("network_interface_txrx"), translate("network_interface_txrx_desc")) + +function txrx.cfgvalue(self, section) + local ix = self.map:get(section, "ifname") + + local rx = netstat and netstat[ix] and netstat[ix][1] + rx = rx and luci.tools.webadmin.byte_format(tonumber(rx)) or "-" + + local tx = netstat and netstat[ix] and netstat[ix][9] + tx = tx and luci.tools.webadmin.byte_format(tonumber(tx)) or "-" + + return string.format("%s / %s", tx, rx) +end + +errors = s:option(DummyValue, "_err", + translate("network_interface_err"), translate("network_interface_err_desc")) + +function errors.cfgvalue(self, section) + local ix = self.map:get(section, "ifname") + + local rx = netstat and netstat[ix] and netstat[ix][3] + local tx = netstat and netstat[ix] and netstat[ix][11] + + rx = rx and tostring(rx) or "-" + tx = tx and tostring(tx) or "-" + + return string.format("%s / %s", tx, rx) +end + return m diff --git a/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua b/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua index a182fcb..a696f8f 100644 --- a/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua +++ b/openwrt/packages/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua @@ -45,95 +45,15 @@ wlcursor:foreach("wireless", "wifi-device", m = Map("wireless", translate("wifi"), translate("a_w_devices1")) m:chain("network") - --- Status Table -- -s = m:section(Table, ifaces, translate("networks")) - -link = s:option(DummyValue, "_link", translate("link")) -function link.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" -end - -essid = s:option(DummyValue, "ssid", "ESSID") - -bssid = s:option(DummyValue, "_bsiid", "BSSID") -function bssid.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return (wifidata[ifname] and (wifidata[ifname].Cell - or wifidata[ifname]["Access Point"])) or "-" -end - -channel = s:option(DummyValue, "channel", translate("channel")) -function channel.cfgvalue(self, section) - return wireless[self.map:get(section, "device")].channel -end - -protocol = s:option(DummyValue, "_mode", translate("protocol")) -function protocol.cfgvalue(self, section) - local mode = wireless[self.map:get(section, "device")].mode - return mode and "802." .. mode -end - -mode = s:option(DummyValue, "mode", translate("mode")) -encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) - -power = s:option(DummyValue, "_power", translate("power")) -function power.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" -end - -scan = s:option(Button, "_scan", translate("scan")) -scan.inputstyle = "find" - -function scan.cfgvalue(self, section) - return self.map:get(section, "ifname") or false -end - --- WLAN-Scan-Table -- - -t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) - -function scan.write(self, section) - m.autoapply = false - t2.render = t2._render - local ifname = self.map:get(section, "ifname") - luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) -end - -t2._render = t2.render -t2.render = function() end - -t2:option(DummyValue, "Quality", translate("iwscan_link")) -essid = t2:option(DummyValue, "ESSID", "ESSID") -function essid.cfgvalue(self, section) - return self.map:get(section, "ESSID") -end - -t2:option(DummyValue, "Address", "BSSID") -t2:option(DummyValue, "Mode", translate("mode")) -chan = t2:option(DummyValue, "channel", translate("channel")) -function chan.cfgvalue(self, section) - return self.map:get(section, "Channel") - or self.map:get(section, "Frequency") - or "-" -end - -t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) - -t2:option(DummyValue, "Signal level", translate("iwscan_signal")) - -t2:option(DummyValue, "Noise level", translate("iwscan_noise")) - - - if #wifidevs < 1 then return m end -- Config Section -- +local hwtype = m:get(wifidevs[1], "type") + +--[[ s = m:section(NamedSection, wifidevs[1], "wifi-device", translate("devices")) s.addremove = false @@ -155,7 +75,7 @@ ch = s:option(Value, "channel", translate("a_w_channel")) for i=1, 14 do ch:value(i, i .. " (2.4 GHz)") end - +]]-- s = m:section(TypedSection, "wifi-iface", translate("m_n_local")) s.anonymous = true @@ -238,7 +158,7 @@ function key:validate(value, section) return nil end elseif encr:formvalue(section) == 'psk' or encr:formvalue(section) == 'psk2' then - return #value == 64 and value:hexcheck() + return #value > 7 and #value < 64 and value else return value end diff --git a/openwrt/packages/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm b/openwrt/packages/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm index 1666ee0..293a49c 100644 --- a/openwrt/packages/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm +++ b/openwrt/packages/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm @@ -15,7 +15,7 @@ $Id$
-

Powered by <%= luci.__appname__ .. " (v" .. luci.__version__ .. ")" %>

+

Powered by LuCI

diff --git a/openwrt/packages/luci/host/www/luci-static/oxygen/dashboard.css b/openwrt/packages/luci/host/www/luci-static/oxygen/dashboard.css index 1ac147f..b8b3097 100644 --- a/openwrt/packages/luci/host/www/luci-static/oxygen/dashboard.css +++ b/openwrt/packages/luci/host/www/luci-static/oxygen/dashboard.css @@ -20,89 +20,12 @@ div.dashicon a { font-weight: bold; } -div.di_index a { - background-image: url(icons/network.png); +div.di_network a { + background-image: url(icons/network.png); } div.di_wifi a { background-image: url(icons/wifi.png); } - -div.di_network a { - background-image: url(icons/network.png); -} - -div.di_luci a { - background-image: url(icons/desktop.png); -} - -/**div.di_index a { - background-image: url(icons/overview.png); -}**/ - -div.di_logout a { - background-image: url(icons/logout.png); -} - -/**div.di_freifunk a { - background-image: url(icons/freifunk.png); -}**/ - -div.di_status a { - background-image: url(icons/status.png); -} - -div.di_system a { - background-image: url(icons/system.png); -} - -div.di_syslog a { - background-image: url(icons/shell.png); -} - -div.di_ntpc a { - background-image: url(icons/datetime.png); -} - -div.di_leds a { - background-image: url(icons/lightbulb.png); -} - -div.di_reboot a { - background-image: url(icons/restart.png); -} - -div.di_passwd a { - background-image: url(icons/login.png); -} - -div.di_statistics a { - background-image: url(icons/stats.png); -} - -div.di_packages a { - background-image: url(icons/package.png); -} - -div.di_sshkeys a { - background-image: url(icons/key.png); -} - -div.di_upgrade a { - background-image: url(icons/flash.png); -} - -div.di_services a { - background-image: url(icons/worker.png); -} - -div.di_backup a { - background-image: url(icons/switch.png); -} - -div.di_fstab a { - background-image: url(icons/harddisk.png); -} - } diff --git a/openwrt/packages/luci/host/www/luci-static/oxygen/flukso.png b/openwrt/packages/luci/host/www/luci-static/oxygen/flukso.png index d3710f397f788800e1eb5b21b684f82ca8069da2..1e419fef373f2715647cb843f9296432406023fa 100755 GIT binary patch delta 1594 zcmV-A2F3ZN4$KT8iBL{Q4GJ0x0000DNk~Le0002X0000b2nGNE0PM9L!I3s6e+BMI zL_t(|+U#B5YaCS+KH2=vHpvzgQCqWMk)%bl`d}24ZWRK8&`q%K`_Ly*+~AAg%l5(d z?H?d+@kx|qeJx10DA))}qSO?zxUtnD6+20qpSwxC-()76y;;rtxI1??IUh{6yCpMU z&YbU_bMCo!r-gvY2Ls|~UK~jZe-1@)q-gy3!tN)N5BkN=!V%_?5j zoqR?Ij}rXju{*!aMywBlz9D2?uTaN8I(QVN&%$C4eLQvqVj~~0gI4cLEsvZA9&zx1 zP$PoOS@9-8dXN;?AGSuXVU0WzmK|&!NliTBdw2|Jru7Cu3tom!C*K7i-o~pu`n2F(e_{earTimwyWP6 z?r)`7d&}T3}*HKh;6mp{}Z3 z?pNsCHxE6ZPqwR5oA~AN-qW3w9qgi5M@!A;g+I%b{$a)S-+@6)zBir+QDf8O;8y(6 ziFc^$tubmnc|z$uFW;P_rT0Ie%Fnkr4LeHc7g71zE5|7JTz8F7e~gW7O5IqdvFT;k z(cTo zq%D4=loKL-e+(E>C(Yen zuj#4a6-_>*%#BXTkS?J%y5#db+hehPDOuBtg=bg72P{{?vK6_%f*NAxwcgNA9XA^| z4Qp~h2v`h>MUhw>Su?<$>NHcc^Dfq0IR&Pz(cfvre^w3_3nP#yBi9fpoC_~SX=)^D zI=Ek8Y5s4cePq1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Tq~60%m$lEfI9RKC=kYYhffTJvl@iH=zl*n3v{zYj(h1MQfPW`y`bDP;jEqsF>+@`bbntc z^11dpmO9<2tBau!7@CG$^!KxVcJovN6+Q`(DCQlJJ1X)qUzOrJKSZLrk1e9*}Ti%#sB}SjLAR(GeI8dF}p{)h2{hU}I zd6&d)uQ@OHvg&cNV!5NdF-K45KYxbKq3oqR)b4WFQ3=sE^of|v#OWt5C^RiW+@iMu z#4UWwK&jjjB1(7r^Iie69|;{Tr29rE+_rM}yLM&V((Al-WsGt}H-pz%paoK0p>=xz zyr$yERa;u0i{*||&WDDVa>IN)$zf(Wz{7U&$fVp>U3kRI2Oo(Cf~^qY@_)!@?hQ?G z*G|eRj1y1i<7Go#-AQ5o7PF3NW&@QQ>V+Hf zISNe);*df@B!~(ZV%i1g?^XsIGGv2mY;aVFNr#RtKW?IeZAiGxhIj?r5O+?9*&m0r zy8_@>QlI@6UG@h{<79&?Y#4RghGTON9Jj%4{uf{X!zWP^tvv2r00000NkvXXu0mjf DdckMG diff --git a/openwrt/packages/luci/host/www/luci/splash/index.html b/openwrt/packages/luci/host/www/luci/splash/index.html index 486409a..5257312 100644 --- a/openwrt/packages/luci/host/www/luci/splash/index.html +++ b/openwrt/packages/luci/host/www/luci/splash/index.html @@ -4,7 +4,7 @@ - -LuCI - Lua Configuration Interface + +Flukso Configuration Interface diff --git a/openwrt/packages/luci/i18n/english/luasrc/i18n/admin-core.en.lua b/openwrt/packages/luci/i18n/english/luasrc/i18n/admin-core.en.lua index cb2aa4e..4374db2 100644 --- a/openwrt/packages/luci/i18n/english/luasrc/i18n/admin-core.en.lua +++ b/openwrt/packages/luci/i18n/english/luasrc/i18n/admin-core.en.lua @@ -21,8 +21,8 @@ a_i_keepflash = 'Files to be kept when flashing a new firmware' a_i_keepflash1 = 'When flashing a new firmware with LuCI these files will be added to the new firmware installation.' a_st_i_status1 = 'Here you can find information about the current system status like CPU clock frequency, memory usage or network interface data.' a_st_i_status2 = 'Also kernel or service logfiles can be viewed here to get an overview over their current state.' -iwscan = 'WLAN-Scan' -iwscan1 = 'Wifi networks in your local environment' +iwscan = 'Wifi-Scan' +iwscan1 = 'Wifi networks detected by this Fluksometer' iwscan_encr = 'Encr.' iwscan_link = 'Link' iwscan_signal = 'Signal' @@ -103,7 +103,7 @@ a_w_channel = 'Channel' a_w_wifi1 = 'On this pages you can find configuration options for WLAN based wireless networks.' a_w_wifi2 = 'You can easily integrate your 802.11a/b/g/n-devices into your physical network and use the virtual adapter support to build wireless repeaters or offer several networks with one device.' a_w_wifi3 = 'There is support for Managed, Client, Ad-Hoc and WDS operating modes as well as WPA and WPA2 encryption for secure communnication.' -a_w_devices1 = 'Here you can configure installed wifi devices.' +a_w_devices1 = 'Please enter the name, encryption type and key/passphrase of your wifi network.' a_w_txantenna = 'Transmit Antenna' a_w_rxantenna = 'Receive Antenna' a_w_distance1 = 'Distance to furthest station (in meter)' @@ -234,10 +234,11 @@ a_n_routes_kernel6 = 'Active IPv6/dev/null 2>&1]]) == 0 - local restore_cmd = "gunzip | tar -xC/ >/dev/null 2>&1" - local backup_cmd = "tar -c %s | gzip 2>/dev/null" - - local restore_fpi - luci.http.setfilehandler( - function(meta, chunk, eof) - if not restore_fpi then - restore_fpi = io.popen(restore_cmd, "w") - end - if chunk then - restore_fpi:write(chunk) - end - if eof then - restore_fpi:close() - end - end - ) - - local upload = luci.http.formvalue("archive") - local backup = luci.http.formvalue("backup") - local reset = reset_avail and luci.http.formvalue("reset") - - if upload and #upload > 0 then - luci.template.render("mini/applyreboot") - luci.sys.reboot() - elseif backup then - luci.util.perror(backup_cmd:format(_keep_pattern())) - local backup_fpi = io.popen(backup_cmd:format(_keep_pattern()), "r") - luci.http.header('Content-Disposition', 'attachment; filename="backup-%s-%s.tar.gz"' % { - luci.sys.hostname(), os.date("%Y-%m-%d")}) - luci.http.prepare_content("application/x-targz") - luci.ltn12.pump.all(luci.ltn12.source.file(backup_fpi), luci.http.write) - elseif reset then - luci.template.render("mini/applyreboot") - luci.util.exec("mtd -r erase rootfs_data") - else - luci.template.render("mini/backup", {reset_avail = reset_avail}) - end -end - -function action_reboot() - local reboot = luci.http.formvalue("reboot") - luci.template.render("mini/reboot", {reboot=reboot}) - if reboot then - luci.sys.reboot() - end -end - -function action_upgrade() - require("luci.model.uci") - - local ret = nil - local plat = luci.fs.mtime("/lib/upgrade/platform.sh") - local tmpfile = "/tmp/firmware.img" - local keep_avail = true - - local file - luci.http.setfilehandler( - function(meta, chunk, eof) - if not file then - file = io.open(tmpfile, "w") - end - if chunk then - file:write(chunk) - end - if eof then - file:close() - end - end - ) - - local fname = luci.http.formvalue("image") - local keepcfg = keep_avail and luci.http.formvalue("keepcfg") - - if plat and fname then - ret = function() - return luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) - end - end - - luci.http.prepare_content("text/html") - luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) -end - -function _keep_pattern() - local kpattern = "" - local files = luci.model.uci.cursor():get_all("luci", "flash_keep") - if files then - kpattern = "" - for k, v in pairs(files) do - if k:sub(1,1) ~= "." and luci.fs.glob(v) then - kpattern = kpattern .. " " .. v - end - end - end - return kpattern -end diff --git a/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/network.lua b/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/network.lua index 3cbc86c..3c7aeca 100644 --- a/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/network.lua +++ b/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/network.lua @@ -31,58 +31,7 @@ for k, v in pairs(network) do end end -m = Map("network", translate("network")) -s = m:section(Table, ifaces, translate("status")) -s.parse = function() end - -s:option(DummyValue, ".name", translate("network")) - -hwaddr = s:option(DummyValue, "_hwaddr", - translate("network_interface_hwaddr"), translate("network_interface_hwaddr_desc")) -function hwaddr.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") or "" - return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") - or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") - or "n/a" -end - - -s:option(DummyValue, "ipaddr", translate("ipaddress")) - -s:option(DummyValue, "netmask", translate("netmask")) - - -txrx = s:option(DummyValue, "_txrx", - translate("network_interface_txrx"), translate("network_interface_txrx_desc")) - -function txrx.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][1] - rx = rx and luci.tools.webadmin.byte_format(tonumber(rx)) or "-" - - local tx = netstat and netstat[ix] and netstat[ix][9] - tx = tx and luci.tools.webadmin.byte_format(tonumber(tx)) or "-" - - return string.format("%s / %s", tx, rx) -end - -errors = s:option(DummyValue, "_err", - translate("network_interface_err"), translate("network_interface_err_desc")) - -function errors.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][3] - local tx = netstat and netstat[ix] and netstat[ix][11] - - rx = rx and tostring(rx) or "-" - tx = tx and tostring(tx) or "-" - - return string.format("%s / %s", tx, rx) -end - - +m = Map("network", translate("network"), translate("m_n_network")) s = m:section(NamedSection, "lan", "interface", translate("m_n_local")) s.addremove = false @@ -105,7 +54,7 @@ p = s:option(ListValue, "proto", translate("protocol")) p.override_values = true p:value("none", "disabled") p:value("static", translate("manual", "manual")) -p:value("dhcp", translate("automatic", "automatic")) +p:value("dhcp", translate("automatic", "DHCP")) if has_pppoe then p:value("pppoe", "PPPoE") end if has_pptp then p:value("pptp", "PPTP") end diff --git a/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/system.lua b/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/system.lua index 6ab7d0d..e8b8995 100644 --- a/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/system.lua +++ b/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/system.lua @@ -17,17 +17,16 @@ require("luci.sys.zoneinfo") require("luci.tools.webadmin") -m = Map("system", translate("system"), translate("a_s_desc")) +m = Map("system", translate("system"), "") +m.pageaction = false -s = m:section(TypedSection, "system", "") +s = m:section(TypedSection, "system", translate("general")) s.anonymous = true - - local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo() local uptime = luci.sys.uptime() -s:option(DummyValue, "_system", translate("system")).value = system +s:option(DummyValue, "_chipset", translate("m_i_chipset")).value = system s:option(DummyValue, "_cpu", translate("m_i_processor")).value = model local load1, load5, load15 = luci.sys.loadavg() @@ -49,7 +48,169 @@ s:option(DummyValue, "_systime", translate("m_i_systemtime")).value = s:option(DummyValue, "_uptime", translate("m_i_uptime")).value = luci.tools.webadmin.date_format(tonumber(uptime)) - -s:option(DummyValue, "hostname", translate("hostname")) + +-- Wifi Data init -- +local uci = luci.model.uci.cursor() +if not uci:get("network", "wan") then + uci:section("network", "interface", "wan", {proto="none", ifname=" "}) + uci:save("network") + uci:commit("network") +end + +local wlcursor = luci.model.uci.cursor_state() +local wireless = wlcursor:get_all("wireless") +local wifidata = luci.sys.wifi.getiwconfig() +local wifidevs = {} +local ifaces = {} + +for k, v in pairs(wireless) do + if v[".type"] == "wifi-iface" then + table.insert(ifaces, v) + end +end + +wlcursor:foreach("wireless", "wifi-device", + function(section) + table.insert(wifidevs, section[".name"]) + end) + + +-- Wifi Status Table -- +s = m:section(Table, ifaces, translate("wifi")) + +link = s:option(DummyValue, "_link", translate("link")) +function link.cfgvalue(self, section) + local ifname = self.map:get(section, "ifname") + return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" +end + +essid = s:option(DummyValue, "ssid", "ESSID") + +bssid = s:option(DummyValue, "_bsiid", "BSSID") +function bssid.cfgvalue(self, section) + local ifname = self.map:get(section, "ifname") + return (wifidata[ifname] and (wifidata[ifname].Cell + or wifidata[ifname]["Access Point"])) or "-" +end + +protocol = s:option(DummyValue, "_mode", translate("protocol")) +function protocol.cfgvalue(self, section) + local mode = wireless[self.map:get(section, "device")].mode + return mode and "802." .. mode +end + +mode = s:option(DummyValue, "mode", translate("mode")) +encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) + +power = s:option(DummyValue, "_power", translate("power")) +function power.cfgvalue(self, section) + local ifname = self.map:get(section, "ifname") + return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" +end + +scan = s:option(Button, "_scan", translate("scan")) +scan.inputstyle = "find" + +function scan.cfgvalue(self, section) + return self.map:get(section, "ifname") or false +end + +-- Wifi-Scan-Table -- +t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) + +function scan.write(self, section) + m.autoapply = false + t2.render = t2._render + local ifname = self.map:get(section, "ifname") + luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) +end + +t2._render = t2.render +t2.render = function() end + +t2:option(DummyValue, "Quality", translate("iwscan_link")) +essid = t2:option(DummyValue, "ESSID", "ESSID") +function essid.cfgvalue(self, section) + return self.map:get(section, "ESSID") +end + +t2:option(DummyValue, "Address", "BSSID") +t2:option(DummyValue, "Mode", translate("mode")) +chan = t2:option(DummyValue, "channel", translate("channel")) +function chan.cfgvalue(self, section) + return self.map:get(section, "Channel") + or self.map:get(section, "Frequency") + or "-" +end + +t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) + +t2:option(DummyValue, "Signal level", translate("iwscan_signal")) + +t2:option(DummyValue, "Noise level", translate("iwscan_noise")) + +-- Interface Data Init-- +local network = luci.model.uci.cursor_state():get_all("network") + +local netstat = luci.sys.net.deviceinfo() +local ifaces = {} + +for k, v in pairs(network) do + if v[".type"] == "interface" and k ~= "loopback" then + table.insert(ifaces, v) + end +end + +-- Interfaces Status Table-- +s = m:section(Table, ifaces, translate("interfaces")) +s.parse = function() end + +s:option(DummyValue, ".name", translate("interface")) + +hwaddr = s:option(DummyValue, "_hwaddr", + translate("network_interface_hwaddr"), translate("network_interface_hwaddr_desc")) +function hwaddr.cfgvalue(self, section) + local ix = self.map:get(section, "ifname") or "" + return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") + or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") + or "n/a" +end + + +s:option(DummyValue, "ipaddr", translate("ipaddress")) + +s:option(DummyValue, "netmask", translate("netmask")) + + +txrx = s:option(DummyValue, "_txrx", + translate("network_interface_txrx"), translate("network_interface_txrx_desc")) + +function txrx.cfgvalue(self, section) + local ix = self.map:get(section, "ifname") + + local rx = netstat and netstat[ix] and netstat[ix][1] + rx = rx and luci.tools.webadmin.byte_format(tonumber(rx)) or "-" + + local tx = netstat and netstat[ix] and netstat[ix][9] + tx = tx and luci.tools.webadmin.byte_format(tonumber(tx)) or "-" + + return string.format("%s / %s", tx, rx) +end + +errors = s:option(DummyValue, "_err", + translate("network_interface_err"), translate("network_interface_err_desc")) + +function errors.cfgvalue(self, section) + local ix = self.map:get(section, "ifname") + + local rx = netstat and netstat[ix] and netstat[ix][3] + local tx = netstat and netstat[ix] and netstat[ix][11] + + rx = rx and tostring(rx) or "-" + tx = tx and tostring(tx) or "-" + + return string.format("%s / %s", tx, rx) +end + return m diff --git a/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua b/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua index 061629d..852e722 100644 --- a/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua +++ b/openwrt/packages/luci/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua @@ -45,84 +45,6 @@ wlcursor:foreach("wireless", "wifi-device", m = Map("wireless", translate("wifi"), translate("a_w_devices1")) m:chain("network") - --- Status Table -- -s = m:section(Table, ifaces, translate("networks")) - -link = s:option(DummyValue, "_link", translate("link")) -function link.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" -end - -essid = s:option(DummyValue, "ssid", "ESSID") - -bssid = s:option(DummyValue, "_bsiid", "BSSID") -function bssid.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return (wifidata[ifname] and (wifidata[ifname].Cell - or wifidata[ifname]["Access Point"])) or "-" -end - -protocol = s:option(DummyValue, "_mode", translate("protocol")) -function protocol.cfgvalue(self, section) - local mode = wireless[self.map:get(section, "device")].mode - return mode and "802." .. mode -end - -mode = s:option(DummyValue, "mode", translate("mode")) -encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) - -power = s:option(DummyValue, "_power", translate("power")) -function power.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" -end - -scan = s:option(Button, "_scan", translate("scan")) -scan.inputstyle = "find" - -function scan.cfgvalue(self, section) - return self.map:get(section, "ifname") or false -end - --- WLAN-Scan-Table -- - -t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) - -function scan.write(self, section) - m.autoapply = false - t2.render = t2._render - local ifname = self.map:get(section, "ifname") - luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) -end - -t2._render = t2.render -t2.render = function() end - -t2:option(DummyValue, "Quality", translate("iwscan_link")) -essid = t2:option(DummyValue, "ESSID", "ESSID") -function essid.cfgvalue(self, section) - return self.map:get(section, "ESSID") -end - -t2:option(DummyValue, "Address", "BSSID") -t2:option(DummyValue, "Mode", translate("mode")) -chan = t2:option(DummyValue, "channel", translate("channel")) -function chan.cfgvalue(self, section) - return self.map:get(section, "Channel") - or self.map:get(section, "Frequency") - or "-" -end - -t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) - -t2:option(DummyValue, "Signal level", translate("iwscan_signal")) - -t2:option(DummyValue, "Noise level", translate("iwscan_noise")) - - - if #wifidevs < 1 then return m end @@ -131,31 +53,8 @@ end local hwtype = m:get(wifidevs[1], "type") ---[[ -s = m:section(NamedSection, wifidevs[1], "wifi-device", translate("devices")) -s.addremove = false -local hwtype = m:get(wifidevs[1], "type") - -if hwtype == "atheros" then - mode = s:option(ListValue, "hwmode", translate("mode")) - mode.override_values = true - mode:value("", "auto") - mode:value("11b", "802.11b") - mode:value("11g", "802.11g") - mode:value("11a", "802.11a") - mode:value("11bg", "802.11b+g") - mode.rmempty = true -end - - -ch = s:option(Value, "channel", translate("a_w_channel")) -for i=1, 14 do - ch:value(i, i .. " (2.4 GHz)") -end -]]-- - -s = m:section(TypedSection, "wifi-iface", translate("m_n_local")) +s = m:section(TypedSection, "wifi-iface", "") s.anonymous = true s.addremove = false diff --git a/openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css b/openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css index b8b3097..184afe7 100644 --- a/openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css +++ b/openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/dashboard.css @@ -20,12 +20,16 @@ div.dashicon a { font-weight: bold; } +div.di_system a { + background-image: url(icons/system.png); +} + div.di_network a { background-image: url(icons/network.png); } div.di_wifi a { - background-image: url(icons/wifi.png); + background-image: url(icons/wifi.png); } } diff --git a/openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/system.png b/openwrt/packages/luci/themes/oxygen/htdocs/luci-static/oxygen/icons/system.png new file mode 100644 index 0000000000000000000000000000000000000000..db92faa4e76bcb98d1541fff5db233bdfdf546f1 GIT binary patch literal 6984 zcmY*eWl$Wzl13L_BxtZ;!67&-1PQ@CxD%Y|B?#^PtT^2oZ_wK50 zs(QL+eoS|@P0u&s%8F80=x@>C;NY-iq(6Uo<)Z%x74SNjS~;%0G9>3uGHR%=!w1zg z>~)RiAg%2T2M0L%NAMJ`{5-FlBrXzKE~@tCF798Q%;4PJ-Px?{tes81I+(H9J6WWk z2)%`ad;3e~vzVI4(jRXOz46=IF4)QM5BSUTPn_nz&HEOPB2-kEK2^5xd~e|j*=>iHy%nU9P&Xzqmj64xD*pT(3P``ej}U?YSE4 zU3+CaukpY=n(1`;b##V?4oJVMGE$-2)M!|3B=+a!=CM#A{aXvl=dp7Eukm5Q_hz|L zqIXK1Zc}5Kf)#ptdcV;X@Y32%27m^!4z8}ptdHrAN7IE}-24m-#WyFbZ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