adapt openwrt-23.05

This commit is contained in:
sbwml 2023-05-27 02:01:59 +08:00
parent 3258e0cb27
commit 6d5942a5ec
3 changed files with 635 additions and 739 deletions

View File

@ -3,7 +3,7 @@
[ ! -f '/etc/rpcd_10_system.js' ] || \
mv -f '/etc/rpcd_10_system.js' '/www/luci-static/resources/view/status/include/10_system.js'
[ ! -f '/etc/rpcd_luci' ] || \
mv -f '/etc/rpcd_luci' '/usr/libexec/rpcd/luci'
mv -f '/etc/rpcd_luci' '/usr/share/rpcd/ucode/luci'
/etc/init.d/rpcd restart
exit 0

View File

@ -3,6 +3,11 @@
'require fs';
'require rpc';
var callLuciVersion = rpc.declare({
object: 'luci',
method: 'getVersion'
});
var callSystemBoard = rpc.declare({
object: 'system',
method: 'board'
@ -44,7 +49,7 @@ return baseclass.extend({
L.resolveDefault(callCPUInfo(), {}),
L.resolveDefault(callCPUUsage(), {}),
L.resolveDefault(callTempInfo(), {}),
fs.lines('/usr/lib/lua/luci/version.lua')
L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' })
]);
},
@ -57,11 +62,7 @@ return baseclass.extend({
tempinfo = data[5],
luciversion = data[6];
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;

File diff suppressed because it is too large Load Diff