From d1a82d28868678716f16472f70b46557ba99f8df Mon Sep 17 00:00:00 2001 From: Jaymin Patel Date: Thu, 8 Sep 2022 10:05:13 +0530 Subject: luci-app-keepalived: Add LuCI for keepalived LuCI Support for Keepalived Signed-off-by: Jaymin Patel --- .../resources/view/keepalived/globals.js | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js (limited to 'applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js') diff --git a/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js b/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js new file mode 100644 index 0000000000..5329d3304c --- /dev/null +++ b/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js @@ -0,0 +1,66 @@ +'use strict'; +'require view'; +'require form'; + +return view.extend({ + render: function() { + var m, s, o; + + m = new form.Map('keepalived'); + + s = m.section(form.TypedSection, 'globals', _('Keepalived Global Settings')); + s.anonymous = true; + s.addremove = false; + + o = s.option(form.Value, 'router_id', _('Router ID'), + _('String identifying the machine (doesn\'t have to be hostname)')); + o.optional = true; + o.placeholder = 'OpenWrt'; + + 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; + o.default = true; + + o = s.option(form.DynamicList, 'notification_email', _('Notification E-Mail'), + _('EMail accounts that will receive the notification mail')); + o.optional = true; + o.placeholder = 'admin@example.com'; + + o = s.option(form.Value, 'notification_email_from', _('Notification E-Mail From'), + _('Email to use when processing “MAIL FROM:” SMTP command')); + o.optional = true; + o.placeholder = 'admin@example.com'; + + o = s.option(form.Value, 'smtp_server', _('SMTP Server'), + _('Server to use for sending mail notifications')); + o.optional = true; + o.placeholder = '127.0.0.1 []'; + + o = s.option(form.Value, 'smtp_connect_timeout', _('SMTP Connect Timeout'), + _('Timeout in seconds for SMTP stream processing')); + o.optional = true; + o.datatype = 'uinteger'; + o.placeholder = '30'; + + o = s.option(form.Value, 'vrrp_mcast_group4', _('VRRP Multicast Group 4'), + _('Multicast Group to use for IPv4 VRRP adverts')); + o.optional = true; + o.datatype = 'ip4addr'; + o.placeholder = '224.0.0.18'; + + o = s.option(form.Value, 'vrrp_mcast_group6', _('VRRP Multicast Group 6'), + _('Multicast Group to use for IPv6 VRRP adverts')); + o.optional = true; + o.datatype = 'ip6addr'; + o.placeholder = 'ff02::12'; + + o = s.option(form.Value, 'vrrp_startup_delay', _('VRRP Startup Delay'), + _('Delay in seconds before VRRP instances start up after')); + o.optional = true; + o.datatype = 'float'; + o.placeholder = '5.5'; + + return m.render(); + } +}); -- cgit v1.2.3