omcproxy.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2019 Shun Li <riverscn@gmail.com>
  2. // This is free software, licensed under the Apache License, Version 2.0
  3. 'use strict';
  4. 'require view';
  5. 'require form';
  6. 'require tools.widgets as widgets';
  7. return view.extend({
  8. render: function () {
  9. let m, s, o;
  10. m = new form.Map('omcproxy', _('omcproxy'), _('Embedded IGMPv3 and MLDv2 proxy'));
  11. s = m.section(form.TypedSection, 'proxy', _('Proxy Instance'));
  12. s.anonymous = true;
  13. s.addremove = true;
  14. s.addbtntitle = _('Add instance');
  15. o = s.option(form.ListValue, 'scope', _('Scope'), _('Minimum multicast scope to proxy (only affects IPv6 multicast)'));
  16. o.datatype = 'string';
  17. o.value('', _('default'))
  18. o.value('global', _('global'))
  19. o.value('organization', _('organization-local'))
  20. o.value('site', _('site-local'))
  21. o.value('admin', _('admin-local'))
  22. o.value('realm', _('realm'))
  23. o.default = '';
  24. o.rmempty = true;
  25. o = s.option(widgets.NetworkSelect, 'uplink', _('Uplink interface'), _('Where does the multicast come from?'));
  26. o.nocreate = true;
  27. o.rmempty = false;
  28. o = s.option(widgets.NetworkSelect, 'downlink', _('Downlink interface'), _('Where does the multicast go to?'));
  29. o.nocreate = true;
  30. o.rmempty = false;
  31. return m.render();
  32. }
  33. });