luci/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/track_interface.js
Jaymin Patel d1a82d2886 luci-app-keepalived: Add LuCI for keepalived
LuCI Support for Keepalived

Signed-off-by: Jaymin Patel <jem.patel@gmail.com>
2022-10-23 16:19:33 +05:30

36 lines
926 B
JavaScript

'use strict';
'require view';
'require form';
'require tools.widgets as widgets';
'require uci';
return view.extend({
render: function() {
var m, s, o;
m = new form.Map('keepalived');
s = m.section(form.GridSection, 'track_interface', _('Track Interface'));
s.anonymous = true;
s.addremove = true;
s.nodescriptions = true;
o = s.option(form.Value, 'name', _('Name'));
o.rmempty = false;
o.optional = false;
o = s.option(widgets.DeviceSelect, 'value', _('Device'),
_('Device to track'));
o.noaliases = true;
o.rmempty = false;
o.optional = false;
o = s.option(form.Value, 'weight', _('Weight'),
_('When a weight is specified, instead of setting the vrrp_instance to the FAULT state in case of failure, ') +
_('its priority will be increased or decreased by the weight when the interface is up or down'));
o.optional = false;
o.datatype = 'uinteger';
return m.render();
}
});