summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ntpc/luasrc/model/cbi/ntpc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-14 13:25:49 +0000
committerSteven Barth <steven@midlink.org>2008-08-14 13:25:49 +0000
commit8c246e81746fac0fc0ff07266058d4ace5acdd55 (patch)
tree44b22acaf5268ff96067d6efefa70778613be57e /applications/luci-ntpc/luasrc/model/cbi/ntpc
parente42779fcabec3995b87a50e233e95a2f3f7bc466 (diff)
applications/luci-ntpc: Updated module to work with reworked UCI scheme
Diffstat (limited to 'applications/luci-ntpc/luasrc/model/cbi/ntpc')
-rw-r--r--applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpc.lua25
-rw-r--r--applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpcmini.lua31
2 files changed, 51 insertions, 5 deletions
diff --git a/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpc.lua b/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpc.lua
index 552c9861a..cc4698384 100644
--- a/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpc.lua
+++ b/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpc.lua
@@ -12,15 +12,30 @@ You may obtain a copy of the License at
$Id$
]]--
+require("luci.tools.webadmin")
m = Map("ntpclient", translate("ntpc"), translate("ntpc_desc"))
-s = m:section(TypedSection, "ntpclient", translate("ntpc_timeserver"))
+s = m:section(TypedSection, "ntpclient", translate("general"))
s.anonymous = true
-s.addremove = true
-s.template = "cbi/tblsection"
-s:option(Value, "hostname", translate("hostname"))
-s:option(Value, "port", translate("port")).rmempty = true
+iface = s:option(ListValue, "iface", translate("ntpc_iface"), translate("ntpc_iface_desc"))
+luci.tools.webadmin.cbi_add_networks(iface)
+
+s:option(Value, "interval", translate("ntpc_interval"))
s:option(Value, "count", translate("ntpc_count"), translate("ntpc_count_desc"))
+
+s2 = m:section(TypedSection, "ntpdrift", translate("ntpc_drift"))
+s2.anonymous = true
+s2:option(Value, "freq", translate("ntpc_drift_freq"))
+
+
+s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver"))
+s3.anonymous = true
+s3.addremove = true
+s3.template = "cbi/tblsection"
+
+s3:option(Value, "hostname", translate("hostname"))
+s3:option(Value, "port", translate("port")).rmempty = true
+
return m \ No newline at end of file
diff --git a/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpcmini.lua b/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpcmini.lua
new file mode 100644
index 000000000..af36ca47c
--- /dev/null
+++ b/applications/luci-ntpc/luasrc/model/cbi/ntpc/ntpcmini.lua
@@ -0,0 +1,31 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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$
+]]--
+require("luci.tools.webadmin")
+m = Map("ntpclient", translate("ntpc"), translate("ntpc_desc"))
+
+s = m:section(TypedSection, "ntpclient", translate("general"))
+s.anonymous = true
+s:option(Value, "interval", translate("ntpc_interval"))
+
+
+s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver"))
+s3.anonymous = true
+s3.addremove = true
+s3.template = "cbi/tblsection"
+
+s3:option(Value, "hostname", translate("hostname"))
+s3:option(Value, "port", translate("port")).rmempty = true
+
+return m \ No newline at end of file