From d694491e0023c7befcec8cb415bba1bec9dd35b9 Mon Sep 17 00:00:00 2001 From: Andy Walsh Date: Fri, 22 Nov 2019 14:02:43 +0100 Subject: luci-app-cifsd: add version info * add version info * set guest_ok = yes as default * regen translations Signed-off-by: Andy Walsh --- .../luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'applications/luci-app-cifsd/htdocs') 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'; -- cgit v1.2.3