2008-06-08 08:14:31 +00:00
|
|
|
--[[
|
|
|
|
LuCI - Lua Configuration Interface
|
|
|
|
|
|
|
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
]]--
|
2008-07-18 14:08:34 +00:00
|
|
|
require("luci.http.protocol.date")
|
|
|
|
|
|
|
|
m = Map("system", translate("system"), translate("a_s_desc"))
|
2008-04-12 19:24:08 +00:00
|
|
|
|
2008-06-06 18:27:59 +00:00
|
|
|
s = m:section(TypedSection, "system", "")
|
2008-04-12 19:24:08 +00:00
|
|
|
s.anonymous = true
|
|
|
|
|
2008-06-09 10:10:29 +00:00
|
|
|
s:option(Value, "hostname", translate("hostname"))
|
2008-04-12 19:24:08 +00:00
|
|
|
|
2008-07-18 14:08:34 +00:00
|
|
|
tz = s:option(ListValue, "timezone", translate("timezone"))
|
|
|
|
for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
|
|
|
local zone = k:upper()
|
2008-07-31 09:04:30 +00:00
|
|
|
local osgn = (offset >= 0 and "" or "+")
|
2008-07-20 17:07:54 +00:00
|
|
|
local ohrs = math.floor(-offset / 3600)
|
2008-07-18 14:08:34 +00:00
|
|
|
local omin = (offset % 3600) / 60
|
|
|
|
|
|
|
|
local ptz = zone .. osgn .. (ohrs ~= 0 and ohrs or "") .. (omin ~= 0 and ":" .. omin or "")
|
|
|
|
local dtz = string.format("%+03d:%02d ", ohrs, omin) .. zone
|
|
|
|
|
|
|
|
tz:value(ptz, dtz)
|
|
|
|
end
|
|
|
|
|
|
|
|
s:option(Value, "log_size", nil, "kiB").optional = true
|
|
|
|
s:option(Value, "log_ip").optional = true
|
|
|
|
s:option(Value, "conloglevel").optional = true
|
2008-07-20 17:07:54 +00:00
|
|
|
return m
|