luci-app-keepalived: add a global enabled flag

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 <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2026-03-12 21:39:24 +01:00
parent 8fa4744ebe
commit 11ff260b5f

View 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;