luci-app-mosdns: fix datatype

This commit is contained in:
sbwml 2023-03-31 09:04:23 +08:00
parent db6f7fc971
commit 4b41da1b9e

View File

@ -89,8 +89,7 @@ o:depends("configfile", "/etc/mosdns/config.yaml")
s:tab("advanced", translate("Advanced Options")) 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 = 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,min(1),max(3))"
o.datatype = "and(uinteger,max(3))"
o.default = "1" o.default = "1"
o:depends("configfile", "/etc/mosdns/config.yaml") o:depends("configfile", "/etc/mosdns/config.yaml")
@ -145,13 +144,12 @@ o.default = "600"
o:depends("dump_file", "1") 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 = 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,min(0),max(604800))"
o.datatype = "and(uinteger,max(3600))"
o.default = "0" o.default = "0"
o:depends("configfile", "/etc/mosdns/config.yaml") 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 = 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.default = "0"
o:depends("configfile", "/etc/mosdns/config.yaml") o:depends("configfile", "/etc/mosdns/config.yaml")