summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/globals.js
blob: 67781b59af021d7b8acea7d4042c643f681b5d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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 (need not 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 [<PORT>]';

		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();
	}
});