pagekitec.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict';
  2. 'require view';
  3. 'require form';
  4. var desc = _(""
  5. + "<p/>Note: you need a working PageKite account, or at least, your own running front end for this form to work. "
  6. + "Visit <a href='https://pagekite.net/home/'>your account</a> to set up a name for your "
  7. + "router and get a secret key for the connection."
  8. + "<p/><em>Note: this web configurator only supports "
  9. + "some very very basic uses of pagekite.</em>"
  10. );
  11. return view.extend({
  12. render: function() {
  13. var m, s, o;
  14. m = new form.Map('pagekitec', _('PageKite'), desc);
  15. s = m.section(form.TypedSection, 'pagekitec', _("Configuration"));
  16. s.anonymous = true;
  17. o = s.option(form.Value, "kitename", _("Kite Name"));
  18. o = s.option(form.Value, "kitesecret", _("Kite Secret"));
  19. o.password = true;
  20. o = s.option(form.Flag, "static", _("Static setup"),
  21. _("Static setup, disable FE failover and DDNS updates, set this if you are running your "
  22. + "own frontend without a pagekite.me account"));
  23. o = s.option(form.Flag, "simple_http", _("Basic HTTP"), _("Enable a tunnel to the local HTTP server (in most cases, this admin interface)"));
  24. o = s.option(form.Flag, "simple_ssh", _("Basic SSH"), _("Enable a tunnel to the local SSH server"));
  25. o = s.option(form.Value, "simple_ws", _("Basic WebSockets"), _("Enable a WebSockets tunnel on a given local port"));
  26. o.placeholder = 8083;
  27. o.datatype = "port";
  28. o.optional = true;
  29. return m.render();
  30. }
  31. });