Merge pull request #5520 from acooler15/luci-lib-docker
[project/luci.git] / modules / luci-mod-system / htdocs / luci-static / resources / view / system / dropbear.js
1 'use strict';
2 'require view';
3 'require form';
4 'require tools.widgets as widgets';
5
6 return view.extend({
7 render: function() {
8 var m, s, o;
9
10 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'));
11
12 s = m.section(form.TypedSection, 'dropbear', _('Dropbear Instance'));
13 s.anonymous = true;
14 s.addremove = true;
15 s.addbtntitle = _('Add instance');
16
17 o = s.option(widgets.NetworkSelect, 'Interface', _('Interface'), _('Listen only on the given interface or, if unspecified, on all'));
18 o.nocreate = true;
19
20 o = s.option(form.Value, 'Port', _('Port'));
21 o.datatype = 'port';
22 o.placeholder = 22;
23
24 o = s.option(form.Flag, 'PasswordAuth', _('Password authentication'), _('Allow <abbr title="Secure Shell">SSH</abbr> password authentication'));
25 o.enabled = 'on';
26 o.disabled = 'off';
27 o.default = o.enabled;
28 o.rmempty = false;
29
30 o = s.option(form.Flag, 'RootPasswordAuth', _('Allow root logins with password'), _('Allow the <em>root</em> user to log in with password'));
31 o.enabled = 'on';
32 o.disabled = 'off';
33 o.default = o.enabled;
34
35 o = s.option(form.Flag, 'GatewayPorts', _('Gateway Ports'), _('Allow remote hosts to connect to local SSH forwarded ports'));
36 o.enabled = 'on';
37 o.disabled = 'off';
38 o.default = o.disabled;
39
40 return m.render();
41 }
42 });