summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-smbd/htdocs
diff options
context:
space:
mode:
authorAndy Walsh <andy.walsh44+github@gmail.com>2020-01-26 16:48:16 +0100
committerAndy Walsh <andy.walsh44+github@gmail.com>2020-01-26 16:48:16 +0100
commit4145392f8c4cfae8412d4c18a001d35e22a49902 (patch)
tree9ab1b0af4ab90e0f61bf739d3c2812defac14b9b /applications/luci-app-smbd/htdocs
parent0896501713e1e3311f74c7774abdab24f6f3cac2 (diff)
luci-app-smbd: rename to luci-app-ksmbd
* follow upstream name change to ksmbd * remove old artifacs from "applications\luci-app-cifsd\po\" Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
Diffstat (limited to 'applications/luci-app-smbd/htdocs')
-rw-r--r--applications/luci-app-smbd/htdocs/luci-static/resources/view/smbd.js112
1 files changed, 0 insertions, 112 deletions
diff --git a/applications/luci-app-smbd/htdocs/luci-static/resources/view/smbd.js b/applications/luci-app-smbd/htdocs/luci-static/resources/view/smbd.js
deleted file mode 100644
index f1d8cf4808..0000000000
--- a/applications/luci-app-smbd/htdocs/luci-static/resources/view/smbd.js
+++ /dev/null
@@ -1,112 +0,0 @@
-'use strict';
-'require fs';
-'require form';
-'require tools.widgets as widgets';
-
-return L.view.extend({
- load: function() {
- return Promise.all([
- L.resolveDefault(fs.stat('/sbin/block'), null),
- L.resolveDefault(fs.stat('/etc/config/fstab'), null),
- L.resolveDefault(fs.exec('/usr/sbin/usmbd', ['-V']), {}).then(function(res) { return L.toArray((res.stdout || '').match(/version : (\S+)/))[1] }),
- L.resolveDefault(fs.exec('/sbin/modinfo', ['smbd']), {}).then(function(res) { return L.toArray((res.stdout || '').match(/version:\t(\S+)/))[1] }),
- ]);
- },
- render: function(stats) {
- var m, s, o, v;
- v = '';
-
- m = new form.Map('smbd', _('Network Shares'));
-
- if (stats[2]) {
- v = stats[2].trim();
- }
- if (stats[3]) {
- v = v + ' Kmod: ' + stats[3].trim();
- }
- s = m.section(form.TypedSection, 'globals', 'Smbd: ' + v);
- s.anonymous = true;
-
- s.tab('general', _('General Settings'));
- s.tab('template', _('Edit Template'));
-
- s.taboption('general', widgets.NetworkSelect, 'interface', _('Interface'),
- _('Listen only on the given interface or, if unspecified, on lan'));
-
- o = s.taboption('general', form.Value, 'workgroup', _('Workgroup'));
- o.placeholder = 'WORKGROUP';
-
- o = s.taboption('general', form.Value, 'description', _('Description'));
- o.placeholder = 'Smbd on OpenWrt';
-
- o = s.taboption('template', form.TextValue, '_tmpl',
- _('Edit the template that is used for generating the smbd configuration.'),
- _("This is the content of the file '/etc/smbd/smb.conf.template' from which your smbd configuration will be generated. \
- Values enclosed by pipe symbols ('|') should not be changed. They get their values from the 'General Settings' tab."));
- o.rows = 20;
- o.cfgvalue = function(section_id) {
- return fs.trimmed('/etc/smbd/smb.conf.template');
- };
- o.write = function(section_id, formvalue) {
- return fs.write('/etc/smbd/smb.conf.template', formvalue.trim().replace(/\r\n/g, '\n') + '\n');
- };
-
-
- s = m.section(form.TableSection, 'share', _('Shared Directories'),
- _('Please add directories to share. Each directory refers to a folder on a mounted device.'));
- s.anonymous = true;
- s.addremove = true;
-
- s.option(form.Value, 'name', _('Name'));
- o = s.option(form.Value, 'path', _('Path'));
- if (stats[0] && stats[1]) {
- o.titleref = L.url('admin', 'system', 'mounts');
- }
-
- o = s.option(form.Flag, 'browseable', _('Browse-able'));
- o.enabled = 'yes';
- o.disabled = 'no';
- o.default = 'yes';
-
- o = s.option(form.Flag, 'read_only', _('Read-only'));
- o.enabled = 'yes';
- o.disabled = 'no';
- o.default = 'no'; // smb.conf default is 'yes'
- o.rmempty = false;
-
- s.option(form.Flag, 'force_root', _('Force Root'));
-
- o = s.option(form.Value, 'users', _('Allowed users'));
- o.rmempty = true;
-
- o = s.option(form.Flag, 'guest_ok', _('Allow guests'));
- o.enabled = 'yes';
- o.disabled = 'no';
- o.default = 'yes'; // smb.conf default is 'no'
- o.rmempty = false;
-
- o = s.option(form.Flag, 'inherit_owner', _('Inherit owner'));
- o.enabled = 'yes';
- o.disabled = 'no';
- o.default = 'no';
-
- o = s.option(form.Flag, 'hide_dot_files', _('Hide dot files'));
- o.enabled = 'yes';
- o.disabled = 'no';
- o.default = 'yes';
-
- o = s.option(form.Value, 'create_mask', _('Create mask'));
- o.maxlength = 4;
- o.default = '0666'; // smb.conf default is '0744'
- o.placeholder = '0666';
- o.rmempty = false;
-
- o = s.option(form.Value, 'dir_mask', _('Directory mask'));
- o.maxlength = 4;
- o.default = '0777'; // smb.conf default is '0755'
- o.placeholder = '0777';
- o.rmempty = false;
-
- return m.render();
- }
-});