Update my email addresses in the license headers
[project/luci.git] / applications / luci-app-ntpc / luasrc / model / cbi / ntpc / ntpc.lua
1 -- Copyright 2008 Steven Barth <steven@midlink.org>
2 -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
3 -- Licensed to the public under the Apache License 2.0.
4
5 m = Map("ntpclient", translate("Time Synchronisation"), translate("Synchronizes the system time"))
6
7 s = m:section(TypedSection, "ntpclient", translate("General"))
8 s.anonymous = true
9 s.addremove = false
10
11 s:option(DummyValue, "_time", translate("Current system time")).value = os.date("%c")
12
13 interval = s:option(Value, "interval", translate("Update interval (in seconds)"))
14 interval.datatype = "and(uinteger,min(1))"
15 interval.rmempty = true
16
17 count = s:option(Value, "count", translate("Count of time measurements"), translate("empty = infinite"))
18 count.datatype = "and(uinteger,min(1))"
19 count.rmempty = true
20
21 s2 = m:section(TypedSection, "ntpdrift", translate("Clock Adjustment"))
22 s2.anonymous = true
23 s2.addremove = false
24
25 freq = s2:option(Value, "freq", translate("Offset frequency"))
26 freq.datatype = "integer"
27 freq.rmempty = true
28
29 s3 = m:section(TypedSection, "ntpserver", translate("Time Servers"))
30 s3.anonymous = true
31 s3.addremove = true
32 s3.template = "cbi/tblsection"
33
34 s3:option(Value, "hostname", translate("Hostname"))
35 port = s3:option(Value, "port", translate("Port"))
36 port.datatype = "port"
37 port.rmempty = true
38
39 return m