From 4b41da1b9e4db5c685ecbbe2b62beccd14ceda83 Mon Sep 17 00:00:00 2001 From: sbwml Date: Fri, 31 Mar 2023 09:04:23 +0800 Subject: [PATCH] luci-app-mosdns: fix datatype --- luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua b/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua index 1b51488..f3c0ac8 100644 --- a/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua +++ b/luci-app-mosdns/luasrc/model/cbi/mosdns/basic.lua @@ -89,8 +89,7 @@ o:depends("configfile", "/etc/mosdns/config.yaml") s:tab("advanced", translate("Advanced Options")) o = s:taboption("advanced", Value, "concurrent", translate("Concurrent"), translate("DNS query request concurrency, The number of upstream DNS servers that are allowed to initiate requests at the same time")) -o.datatype = "and(uinteger,min(1))" -o.datatype = "and(uinteger,max(3))" +o.datatype = "and(uinteger,min(1),max(3))" o.default = "1" o:depends("configfile", "/etc/mosdns/config.yaml") @@ -145,13 +144,12 @@ o.default = "600" o:depends("dump_file", "1") o = s:taboption("advanced", Value, "minimal_ttl", translate("Minimum TTL"), translate("Modify the Minimum TTL value (seconds) for DNS answer results, 0 indicating no modification")) -o.datatype = "and(uinteger,min(0))" -o.datatype = "and(uinteger,max(3600))" +o.datatype = "and(uinteger,min(0),max(604800))" o.default = "0" o:depends("configfile", "/etc/mosdns/config.yaml") o = s:taboption("advanced", Value, "maximum_ttl", translate("Maximum TTL"), translate("Modify the Maximum TTL value (seconds) for DNS answer results, 0 indicating no modification")) -o.datatype = "and(uinteger,min(0))" +o.datatype = "and(uinteger,min(0),max(604800))" o.default = "0" o:depends("configfile", "/etc/mosdns/config.yaml")