projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modules/admin-full, modules/admin-mini: prevent addremove in system page
[project/luci.git]
/
modules
/
admin-mini
/
luasrc
/
model
/
cbi
/
mini
/
system.lua
diff --git
a/modules/admin-mini/luasrc/model/cbi/mini/system.lua
b/modules/admin-mini/luasrc/model/cbi/mini/system.lua
index
fa23b7c
..
90ee790
100644
(file)
--- a/
modules/admin-mini/luasrc/model/cbi/mini/system.lua
+++ b/
modules/admin-mini/luasrc/model/cbi/mini/system.lua
@@
-21,7
+21,7
@@
m = Map("system", translate("system"), translate("a_s_desc"))
s = m:section(TypedSection, "system", "")
s.anonymous = true
s = m:section(TypedSection, "system", "")
s.anonymous = true
-
+s.addremove = false
local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo()
local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo()
@@
-38,11
+38,12
@@
s:option(DummyValue, "_memtotal", translate("m_i_memory")).value =
string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)",
tonumber(memtotal) / 1024,
100 * memcached / memtotal,
string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)",
tonumber(memtotal) / 1024,
100 * memcached / memtotal,
- t
ranslate("mem_cached") or ""
,
+ t
ostring(translate("mem_cached", ""))
,
100 * membuffers / memtotal,
100 * membuffers / memtotal,
- t
ranslate("mem_buffered") or ""
,
+ t
ostring(translate("mem_buffered", ""))
,
100 * memfree / memtotal,
100 * memfree / memtotal,
- translate("mem_free") or "")
+ tostring(translate("mem_free", ""))
+)
s:option(DummyValue, "_systime", translate("m_i_systemtime")).value =
os.date("%c")
s:option(DummyValue, "_systime", translate("m_i_systemtime")).value =
os.date("%c")