string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)",
tonumber(memtotal) / 1024,
100 * memcached / memtotal,
- translate("mem_cached") or "",
+ tostring(translate("mem_cached"), "")),
100 * membuffers / memtotal,
- translate("mem_buffered") or "",
+ tostring(translate("mem_buffered", "")),
100 * memfree / memtotal,
- translate("mem_free") or "")
+ tostring(translate("mem_free", ""))
f:field(DummyValue, "_systime", translate("m_i_systemtime")).value =
os.date("%c")
local ifaces = {}
for k, v in pairs(wireless) do
- if v[".type"] == "wifi-iface" and luci.util.contains(ffwifs, v.device) then
+ if v[".type"] == "wifi-iface" and (
+ luci.util.contains(ffwifs, v.device) or
+ ( #ffwifs == 0 and (not v.encryption or v.encryption == "none") ) )
+ then
table.insert(ifaces, v)
end
end
net = v6:option(DummyValue, "iface", translate("network"))
function net.cfgvalue(self, section)
- return luci.tools.webadmin.iface_get_network(routes[section].device)
+ return luci.tools.webadmin.iface_get_network(routes6[section].device)
or routes6[section].device
end