leds.js 760 B

123456789101112131415161718192021222324252627282930313233
  1. 'use strict';
  2. 'require view';
  3. 'require form';
  4. return view.extend({
  5. render: function() {
  6. var m, s, o;
  7. m = new form.Map('ser2net', 'ser2net');
  8. s = m.section(form.TypedSection, "led", _("LED redirect"));
  9. s.anonymous = false;
  10. s.addremove = true;
  11. o = s.option(form.Value, "driver", _("Driver"), _("The driver required for the device."));
  12. o.rmempty = false;
  13. o.default = "sysfs";
  14. o = s.option(form.Value, "device", _("Device"), _("The device itself."));
  15. o.rmempty = false;
  16. o.default = "duckbill:red:rs485";
  17. o = s.option(form.Value, "driver", _("Duration"), _("Blink duration."));
  18. o.rmempty = false;
  19. o.default = 20;
  20. o = s.option(form.Value, "state", _("State"));
  21. o.rmempty = false;
  22. o.default = 1;
  23. return m.render();
  24. }
  25. });