globals.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. 'use strict';
  2. 'require view';
  3. 'require form';
  4. return view.extend({
  5. render: function() {
  6. let m, s, o;
  7. m = new form.Map('keepalived');
  8. s = m.section(form.TypedSection, 'globals', _('Keepalived Global Settings'));
  9. s.anonymous = true;
  10. s.addremove = false;
  11. o = s.option(form.Value, 'router_id', _('Router ID'),
  12. _('String identifying the machine (need not be hostname)'));
  13. o.optional = true;
  14. o.placeholder = 'OpenWrt';
  15. o = s.option(form.Flag, 'linkbeat_use_polling', _('Link Polling'),
  16. _('Poll to detect media link failure using ETHTOOL, MII or ioctl interface otherwise uses netlink interface'));
  17. o.optional = true;
  18. o.default = true;
  19. o = s.option(form.DynamicList, 'notification_email', _('Notification E-Mail'),
  20. _('EMail accounts that will receive the notification mail'));
  21. o.optional = true;
  22. o.placeholder = 'admin@example.com';
  23. o = s.option(form.Value, 'notification_email_from', _('Notification E-Mail From'),
  24. _('Email to use when processing “MAIL FROM:” SMTP command'));
  25. o.optional = true;
  26. o.placeholder = 'admin@example.com';
  27. o = s.option(form.Value, 'smtp_server', _('SMTP Server'),
  28. _('Server to use for sending mail notifications'));
  29. o.optional = true;
  30. o.placeholder = '127.0.0.1 [<PORT>]';
  31. o = s.option(form.Value, 'smtp_connect_timeout', _('SMTP Connect Timeout'),
  32. _('Timeout in seconds for SMTP stream processing'));
  33. o.optional = true;
  34. o.datatype = 'uinteger';
  35. o.placeholder = '30';
  36. o = s.option(form.Value, 'vrrp_mcast_group4', _('VRRP Multicast Group 4'),
  37. _('Multicast Group to use for IPv4 VRRP adverts'));
  38. o.optional = true;
  39. o.datatype = 'ip4addr';
  40. o.placeholder = '224.0.0.18';
  41. o = s.option(form.Value, 'vrrp_mcast_group6', _('VRRP Multicast Group 6'),
  42. _('Multicast Group to use for IPv6 VRRP adverts'));
  43. o.optional = true;
  44. o.datatype = 'ip6addr';
  45. o.placeholder = 'ff02::12';
  46. o = s.option(form.Value, 'vrrp_startup_delay', _('VRRP Startup Delay'),
  47. _('Delay in seconds before VRRP instances start up after'));
  48. o.optional = true;
  49. o.datatype = 'float';
  50. o.placeholder = '5.5';
  51. return m.render();
  52. }
  53. });