diff options
Diffstat (limited to 'modules/luci-mod-status')
-rw-r--r-- | modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js | 13 | ||||
-rw-r--r-- | modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js index ae7efa3e75..45f7b4acae 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js @@ -3,6 +3,11 @@ 'require fs'; 'require rpc'; +var callLuciVersion = rpc.declare({ + object: 'luci', + method: 'getVersion' +}); + var callSystemBoard = rpc.declare({ object: 'system', method: 'board' @@ -20,7 +25,7 @@ return baseclass.extend({ return Promise.all([ L.resolveDefault(callSystemBoard(), {}), L.resolveDefault(callSystemInfo(), {}), - fs.lines('/usr/lib/lua/luci/version.lua') + L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }) ]); }, @@ -29,11 +34,7 @@ return baseclass.extend({ systeminfo = data[1], luciversion = data[2]; - luciversion = luciversion.filter(function(l) { - return l.match(/^\s*(luciname|luciversion)\s*=/); - }).map(function(l) { - return l.replace(/^\s*\w+\s*=\s*['"]([^'"]+)['"].*$/, '$1'); - }).join(' '); + luciversion = luciversion.branch + ' ' + luciversion.revision; var datestr = null; diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json index a9ae0cef49..7c2cd0998f 100644 --- a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json +++ b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json @@ -5,10 +5,10 @@ "file": { "/proc/sys/net/netfilter/nf_conntrack_count": [ "read" ], "/proc/sys/net/netfilter/nf_conntrack_max": [ "read" ], - "/usr/lib/lua/luci/version.lua": [ "read" ], "/www/luci-static/resources/view/status/include": [ "list" ] }, "ubus": { + "luci": [ "getVersion" ], "file": [ "list", "read" ], "system": [ "board", "info" ] } |