olsrdhna6.js 977 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. 'require view';
  3. 'require form';
  4. 'require uci';
  5. 'require ui';
  6. return view.extend({
  7. load: function () {
  8. return Promise.all([uci.load('olsrd6')]);
  9. },
  10. render: function () {
  11. var mh = new form.Map('olsrd6', _('OLSR - HNA6-Announcements'), _('Hosts in an OLSR routed network can announce connectivity ' + 'to external networks using HNA6 messages.'));
  12. var hna6 = mh.section(form.TypedSection, 'Hna6', _('Hna6'), _('IPv6 network must be given in full notation, ' + 'prefix must be in CIDR notation.'));
  13. hna6.addremove = true;
  14. hna6.anonymous = true;
  15. hna6.template = 'cbi/tblsection';
  16. var net6 = hna6.option(form.Value, 'netaddr', _('Network address'));
  17. net6.datatype = 'ip6addr';
  18. net6.placeholder = 'fec0:2200:106:0:0:0:0:0';
  19. net6.default = 'fec0:2200:106:0:0:0:0:0';
  20. var msk6 = hna6.option(form.Value, 'prefix', _('Prefix'));
  21. msk6.datatype = 'range(0,128)';
  22. msk6.placeholder = '128';
  23. msk6.default = '128';
  24. return mh.render();
  25. },
  26. });