luci-app-keepalived: add a global enabled flag
authorPaul Donald <redacted>
Thu, 12 Mar 2026 20:39:24 +0000 (21:39 +0100)
committerPaul Donald <redacted>
Thu, 12 Mar 2026 20:39:24 +0000 (21:39 +0100)
The default config sets the global enabled to '0'.
Add a flag for it.

Add also FileUpload (browser) for 'alt_config_file'.

Signed-off-by: Paul Donald <redacted>
applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js

index 5ea6353c65fd1b43159a0b65f6114a55084130e4..0fc57c55967c9a042d43e361d006af27fd22ca5e 100644 (file)
@@ -12,11 +12,19 @@ return view.extend({
                s.anonymous = true;
                s.addremove = false;
 
+               o = s.option(form.Flag, 'enabled', _('Enabled'));
+               o.default = o.disabled;
+
                o = s.option(form.Value, 'router_id', _('Router ID'),
                        _('String identifying the machine (need not be hostname)'));
                o.optional = true;
                o.placeholder = 'OpenWrt';
 
+               o = s.option(form.FileUpload, 'alt_config_file', _('Alternative config'));
+               o.optional = true;
+               o.default = '/etc/keepalived/keepalived.conf';
+               o.root_directory = '/etc/';
+
                o = s.option(form.Flag, 'linkbeat_use_polling', _('Link Polling'),
                        _('Poll to detect media link failure using ETHTOOL, MII or ioctl interface otherwise uses netlink interface'));
                o.optional = true;
git clone https://git.99rst.org/PROJECT