mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 14:40:58 +00:00
luci-app: updated log.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
'require fs';
|
||||
'require rpc';
|
||||
'require ui';
|
||||
'require view.ruantiblock.log-widget as abc';
|
||||
'require view.ruantiblock.tools as tools';
|
||||
@@ -14,6 +15,24 @@ return abc.view.extend({
|
||||
|
||||
entriesHandler : null,
|
||||
|
||||
lastBytes : 0,
|
||||
|
||||
callLogSize: rpc.declare({
|
||||
object: 'luci.ruantiblock',
|
||||
method: 'getLogSize',
|
||||
expect: { '': {} }
|
||||
}),
|
||||
|
||||
getLogSize() {
|
||||
return this.callLogSize().then((data) => {
|
||||
if(data.bytes) {
|
||||
return Number(data.bytes);
|
||||
} else {
|
||||
throw new Error(_('An error occurred while trying to get the log size!'));
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
// logd
|
||||
logdHandler(strArray, lineNum) {
|
||||
let logLevel = strArray[5].split('.');
|
||||
|
||||
Reference in New Issue
Block a user