X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_system%2Fsystem.lua;h=7851f05ada7e6e81f502f193f8395392f9314cea;hp=9f9c922319908d3dd1286fd3e5565b5b0c26c38a;hb=84c6b17d78c5cfab8977b4037b717cadde99b4de;hpb=d9cbd92d993dc39a05f7c7888e21ac0cfa3c9b19 diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua index 9f9c92231..7851f05ad 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua @@ -19,6 +19,15 @@ require("luci.fs") m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device like its hostname or the timezone.")) +local has_rdate = false + +m.uci:foreach("system", "rdate", + function() + has_rdate = true + return false + end) + + s = m:section(TypedSection, "system", "") s.anonymous = true s.addremove = false @@ -29,6 +38,9 @@ local uptime = luci.sys.uptime() s:option(DummyValue, "_system", translate("System")).value = system s:option(DummyValue, "_cpu", translate("Processor")).value = model +s:option(DummyValue, "_kernel", translate("Kernel")).value = + luci.util.exec("uname -r") or "?" + local load1, load5, load15 = luci.sys.loadavg() s:option(DummyValue, "_la", translate("Load")).value = string.format("%.2f, %.2f, %.2f", load1, load5, load15) @@ -78,15 +90,18 @@ function tz.write(self, section, value) luci.fs.writefile("/etc/TZ", timezone .. "\n") end -s:option(Value, "log_size", nil, "kiB").optional = true -s:option(Value, "log_ip").optional = true -s:option(Value, "conloglevel").optional = true -s:option(Value, "cronloglevel").optional = true +s:option(Value, "log_size", translate("System log buffer size"), "kiB").optional = true +s:option(Value, "log_ip", translate("External system log server")).optional = true +s:option(Value, "log_port", translate("External system log server port")).optional = true +s:option(Value, "conloglevel", translate("Log output level")).optional = true +s:option(Value, "cronloglevel", translate("Cron Log Level")).optional = true -s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)")) -s2.anonymous = true -s2.addremove = false +if has_rdate then + s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)")) + s2.anonymous = true + s2.addremove = false -s2:option(DynamicList, "server", translate("Server")) + s2:option(DynamicList, "server", translate("Server")) +end return m