summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-cifsd/htdocs/luci-static
diff options
context:
space:
mode:
authorAndy Walsh <andy.walsh44+github@gmail.com>2019-11-22 14:02:43 +0100
committerAndy Walsh <andy.walsh44+github@gmail.com>2019-11-22 14:02:43 +0100
commitd694491e0023c7befcec8cb415bba1bec9dd35b9 (patch)
tree5e18a1ae092ab534b1a5b62eaf17e210c635ff17 /applications/luci-app-cifsd/htdocs/luci-static
parent4fe16b1ec61ebed400d86d3618419e6c64bb38dd (diff)
luci-app-cifsd: add version info
* add version info * set guest_ok = yes as default * regen translations Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
Diffstat (limited to 'applications/luci-app-cifsd/htdocs/luci-static')
-rw-r--r--applications/luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/applications/luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js b/applications/luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js
index 77a11957f1..d536e5bd50 100644
--- a/applications/luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js
+++ b/applications/luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js
@@ -8,14 +8,19 @@ return L.view.extend({
return Promise.all([
L.resolveDefault(fs.stat('/sbin/block'), null),
L.resolveDefault(fs.stat('/etc/config/fstab'), null),
+ L.resolveDefault(fs.exec("cifsd", ["-h"]), {}).then(function(res) { return L.toArray((res.stderr || '').match(/version : (\S+ \S+)/))[1] }),
]);
},
render: function(stats) {
- var m, s, o;
+ var m, s, o, v;
+ v = '';
m = new form.Map('cifsd', _('Network Shares'));
- s = m.section(form.TypedSection, 'globals');
+ if (stats[2]) {
+ v = 'Version ' + stats[2].trim();
+ }
+ s = m.section(form.TypedSection, 'globals', 'Cifsd ' + v);
s.anonymous = true;
s.tab('general', _('General Settings'));
@@ -72,7 +77,7 @@ return L.view.extend({
o = s.option(form.Flag, 'guest_ok', _('Allow guests'));
o.enabled = 'yes';
o.disabled = 'no';
- o.default = 'no';
+ o.default = 'yes';
o = s.option(form.Flag, 'inherit_owner', _('Inherit owner'));
o.enabled = 'yes';