Merge pull request #1735 from sumpfralle/olsr-jsoninfo-parser-handle-empty-result
[oweals/luci.git] / modules / luci-mod-system / htdocs / luci-static / resources / view / system / dropbear.js
1 'use strict';
2 'require form';
3 'require tools.widgets as widgets';
4
5 return L.view.extend({
6         render: function() {
7                 var m, s, o;
8
9                 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'));
10
11                 s = m.section(form.TypedSection, 'dropbear', _('Dropbear Instance'));
12                 s.anonymous = true;
13                 s.addremove = true;
14                 s.addbtntitle = _('Add instance');
15
16                 o = s.option(widgets.NetworkSelect, 'Interface', _('Interface'), _('Listen only on the given interface or, if unspecified, on all'));
17                 o.nocreate    = true;
18                 o.unspecified = 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 login 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 });