luci-mod-network: Restructure DHCP options
authorPaul Donald <newtwen@gmail.com>
Thu, 25 Jan 2024 01:14:33 +0000 (02:14 +0100)
committerPaul Donald <newtwen@gmail.com>
Thu, 25 Jan 2024 23:57:24 +0000 (00:57 +0100)
DHCP limits: add [min|max]_cache_ttl

Signed-off-by: Paul Donald <newtwen@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index ac282209e722ec9cb267878e2f1e654141ca1ff8..775a44614622e16889d7ae89fe611e65cb6f8c5b 100644 (file)
@@ -701,6 +701,19 @@ return view.extend({
                o.datatype = 'range(0,10000)';
                o.placeholder = 1000;
 
+               o = s.taboption('limits', form.Value, 'min_cache_ttl',
+                       _('Min cache TTL'),
+                       _('Extend short TTL values to the seconds value given when caching them. Use with caution.') +
+                       _(' (Max 1h == 3600)'));
+               o.optional = true;
+               o.placeholder = 60;
+
+               o = s.taboption('limits', form.Value, 'max_cache_ttl',
+                       _('Max cache TTL'),
+                       _('Set a maximum seconds TTL value for entries in the cache.'));
+               o.optional = true;
+               o.placeholder = 3600;
+
                o = s.taboption('pxe_tftp', form.Flag, 'enable_tftp',
                        _('Enable TFTP server'),
                        _('Enable the built-in single-instance TFTP server.'));