summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-12-09 16:38:04 +0100
committerJo-Philipp Wich <jow@openwrt.org>2014-12-09 16:38:04 +0100
commit0fb85fb3078e83db2b88b48a943ca05e2ab49903 (patch)
treed48254cf54075e2ea89e3b21319ecbc13c53b704 /applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua
parent91532de6179704e4c69f1580274123f5956baf03 (diff)
parent61c6c67ae684b8ea9642dc5d6bdca4fead58d0c1 (diff)
Merge pull request #262 from chris5560/master
luci-app-ddns: Update to support ddns-scripts 2.1.0-3
Diffstat (limited to 'applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua')
-rw-r--r--applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua51
1 files changed, 25 insertions, 26 deletions
diff --git a/applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua b/applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua
index d7a15a83d..748586cdf 100644
--- a/applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua
+++ b/applications/luci-ddns/luasrc/model/cbi/ddns/detail.lua
@@ -468,29 +468,6 @@ if has_ssl then
end
end
--- use_syslog -- ###############################################################
-slog = ns:taboption("basic", ListValue, "use_syslog",
- translate("Log to syslog"),
- translate("Writes log messages to syslog. Critical Errors will always be written to syslog.") )
-slog.default = "0"
-slog:value("0", translate("No logging"))
-slog:value("1", translate("Info"))
-slog:value("2", translate("Notice"))
-slog:value("3", translate("Warning"))
-slog:value("4", translate("Error"))
-
--- use_logfile (NEW) -- ########################################################
-logf = ns:taboption("basic", Flag, "use_logfile",
- translate("Log to file"),
- translate("Writes detailed messages to log file. File will be truncated automatically.") .. "<br />" ..
- translate("File") .. [[: "]] .. log_dir .. [[/]] .. section .. [[.log"]] )
-logf.orientation = "horizontal"
-logf.rmempty = false -- we want to save in /etc/config/ddns file on "0" because
-logf.default = "1" -- if not defined write to log by default
-function logf.parse(self, section)
- DDNS.flag_parse(self, section)
-end
-
-- TAB: Advanced ##################################################################################
-- IPv4 - ip_source -- #########################################################
src4 = ns:taboption("advanced", ListValue, "ipv4_source",
@@ -1027,6 +1004,29 @@ if has_proxy or ( ( m:get(section, "proxy") or "" ) ~= "" ) then
end
end
+-- use_syslog -- ###############################################################
+slog = ns:taboption("advanced", ListValue, "use_syslog",
+ translate("Log to syslog"),
+ translate("Writes log messages to syslog. Critical Errors will always be written to syslog.") )
+slog.default = "2"
+slog:value("0", translate("No logging"))
+slog:value("1", translate("Info"))
+slog:value("2", translate("Notice"))
+slog:value("3", translate("Warning"))
+slog:value("4", translate("Error"))
+
+-- use_logfile (NEW) -- ########################################################
+logf = ns:taboption("advanced", Flag, "use_logfile",
+ translate("Log to file"),
+ translate("Writes detailed messages to log file. File will be truncated automatically.") .. "<br />" ..
+ translate("File") .. [[: "]] .. log_dir .. [[/]] .. section .. [[.log"]] )
+logf.orientation = "horizontal"
+logf.rmempty = false -- we want to save in /etc/config/ddns file on "0" because
+logf.default = "1" -- if not defined write to log by default
+function logf.parse(self, section)
+ DDNS.flag_parse(self, section)
+end
+
-- TAB: Timer #####################################################################################
-- check_interval -- ###########################################################
ci = ns:taboption("timer", Value, "check_interval",
@@ -1148,9 +1148,8 @@ rc = ns:taboption("timer", Value, "retry_count",
rc.default = 5
rc.rmempty = false -- validate ourselves for translatable error messages
function rc.validate(self, value)
- if not DTYP.uinteger(value)
- or tonumber(value) < 1 then
- return nil, err_tab_timer(self) .. translate("minimum value '1'")
+ if not DTYP.uinteger(value) then
+ return nil, err_tab_timer(self) .. translate("minimum value '0'")
else
return value
end