summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-17 07:43:48 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-17 07:43:48 +0200
commitf878b21c8c4ef9444a9de6bc02b58ed4f91b0b2d (patch)
treefc30189d3019269208eb1d090cf84a42d86515a7 /modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
parent9ae9657a8585b794bc93b993d83e64b6d7f65b92 (diff)
luci-mod-system: remplement dropbear settings as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
new file mode 100644
index 0000000000..7a8b1428d5
--- /dev/null
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
@@ -0,0 +1,42 @@
+'use strict';
+'require form';
+'require tools.widgets as widgets';
+
+return L.view.extend({
+ render: function() {
+ var m, s, o;
+
+ m = new form.Map('dropbear', _('SSH Access'), _('Dropbear offers <abbr title="Secure Shell">SSH</abbr> network shell access and an integrated <abbr title="Secure Copy">SCP</abbr> server'));
+
+ s = m.section(form.TypedSection, 'dropbear', _('Dropbear Instance'));
+ s.anonymous = true;
+ s.addremove = true;
+ s.addbtntitle = _('Add instance');
+
+ o = s.option(widgets.NetworkSelect, 'Interface', _('Interface'), _('Listen only on the given interface or, if unspecified, on all'));
+ o.nocreate = true;
+ o.unspecified = true;
+
+ o = s.option(form.Value, 'Port', _('Port'));
+ o.datatype = 'port';
+ o.placeholder = 22;
+
+ o = s.option(form.Flag, 'PasswordAuth', _('Password authentication'), _('Allow <abbr title="Secure Shell">SSH</abbr> password authentication'));
+ o.enabled = 'on';
+ o.disabled = 'off';
+ o.default = o.enabled;
+ o.rmempty = false;
+
+ o = s.option(form.Flag, 'RootPasswordAuth', _('Allow root logins with password'), _('Allow the <em>root</em> user to login with password'));
+ o.enabled = 'on';
+ o.disabled = 'off';
+ o.default = o.enabled;
+
+ o = s.option(form.Flag, 'GatewayPorts', _('Gateway Ports'), _('Allow remote hosts to connect to local SSH forwarded ports'));
+ o.enabled = 'on';
+ o.disabled = 'off';
+ o.default = o.disabled;
+
+ return m.render();
+ }
+});