diff options
author | Karl Palsson <karlp@etactica.com> | 2020-02-25 17:08:47 +0000 |
---|---|---|
committer | Karl Palsson <karlp@etactica.com> | 2020-02-26 11:46:15 +0000 |
commit | 36e66aeba0e3e1414544d16078d28cb65c2c961c (patch) | |
tree | 903001ce25e1b6b03d447cf1ccd2aa95bfe0f8f3 /applications/luci-app-pagekitec/htdocs/luci-static | |
parent | 507654bcc81871460bf79640788023bf2e05160f (diff) |
luci-app-pagekitec: convert pagekite ui to js
Adds support for the simple_ws option as well, added in the package
itself.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Diffstat (limited to 'applications/luci-app-pagekitec/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-pagekitec/htdocs/luci-static/resources/view/pagekitec.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/applications/luci-app-pagekitec/htdocs/luci-static/resources/view/pagekitec.js b/applications/luci-app-pagekitec/htdocs/luci-static/resources/view/pagekitec.js new file mode 100644 index 0000000000..13161de7a8 --- /dev/null +++ b/applications/luci-app-pagekitec/htdocs/luci-static/resources/view/pagekitec.js @@ -0,0 +1,37 @@ +'use strict'; +'require form'; + +var desc = _("" + + "<p/>Note: you need a working PageKite account, or at least, your own running front end for this form to work. " + + "Visit <a href='https://pagekite.net/home/'>your account</a> to set up a name for your " + + "router and get a secret key for the connection." + + "<p/><em>Note: this web configurator only supports " + + "some very very basic uses of pagekite.</em>" +); + +return L.view.extend({ + render: function() { + var m, s, o; + + m = new form.Map('pagekitec', _('PageKite'), desc); + + s = m.section(form.TypedSection, 'pagekitec', _("Configuration")); + s.anonymous = true; + + o = s.option(form.Value, "kitename", _("Kite Name")); + o = s.option(form.Value, "kitesecret", _("Kite Secret")); + o.password = true; + + o = s.option(form.Flag, "static", _("Static setup"), + _("Static setup, disable FE failover and DDNS updates, set this if you are running your " + + "own frontend without a pagekite.me account")); + o = s.option(form.Flag, "simple_http", _("Basic HTTP"), _("Enable a tunnel to the local HTTP server (in most cases, this admin interface)")); + o = s.option(form.Flag, "simple_ssh", _("Basic SSH"), _("Enable a tunnel to the local SSH server")); + o = s.option(form.Value, "simple_ws", _("Basic WebSockets"), _("Enable a WebSockets tunnel on a given local port")); + o.placeholder = 8083; + o.datatype = "port"; + o.optional = true; + + return m.render(); + } +}); |