diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-11-22 18:09:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 18:09:26 +0100 |
commit | db244bcbb4eb5a4c1a73373a1c55c60e2f60fe6c (patch) | |
tree | 40974dff9064bc8dae19d2721a260fadd87dab45 /applications/luci-app-cifsd/htdocs | |
parent | 9f9da52b55c59436c5d7b9e1f8857dc7a85be801 (diff) | |
parent | d694491e0023c7befcec8cb415bba1bec9dd35b9 (diff) |
Merge pull request #3345 from Andy2244/luci-app-cifsd_add_version_info
luci-app-cifsd: add version info
Diffstat (limited to 'applications/luci-app-cifsd/htdocs')
-rw-r--r-- | applications/luci-app-cifsd/htdocs/luci-static/resources/view/cifsd.js | 11 |
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'; |