/*
poll runtime information
*/
- let buttons, rtRes, infStat, infVer, infElements, infFeeds, infDevices, infUplink, infSystem, nftInfos, runInfos, infFlags, last_run
+ let buttons, rtRes, infStat, infVer, infElements, infFeeds, infDevices, infUplink, infSys, infNft, infRun, infFlags, infLast
pollData: poll.add(function () {
return L.resolveDefault(fs.stat('/var/run/banip.lock')).then(function (stat) {
} else if (rtRes[i].match(/^\s+\+\slast_run\s+\:\s+(.*)$/)) {
rtRes.lastRun = rtRes[i].match(/^\s+\+\slast_run\s+\:\s+(.*)$/)[1];
} else if (rtRes[i].match(/^\s+\+\ssystem_info\s+\:\s+(.*)$/)) {
- rtRes.systemInfo = rtRes[i].match(/^\s+\+\ssystem_info\s+\:\s+(.*)$/)[1];
+ rtRes.sysInfo = rtRes[i].match(/^\s+\+\ssystem_info\s+\:\s+(.*)$/)[1];
}
}
}
if (infUplink) {
infUplink.textContent = rtRes.activeUplink || '-';
}
- nftInfos = document.getElementById('nft');
- if (nftInfos) {
- nftInfos.textContent = rtRes.nftInfo || '-';
+ infNft = document.getElementById('nft');
+ if (infNft) {
+ infNft.textContent = rtRes.nftInfo || '-';
}
- runInfos = document.getElementById('run');
- if (runInfos) {
- runInfos.textContent = rtRes.runInfo || '-';
+ infRun = document.getElementById('run');
+ if (infRun) {
+ infRun.textContent = rtRes.runInfo || '-';
}
infFlags = document.getElementById('flags');
if (infFlags) {
infFlags.textContent = rtRes.runFlags || '-';
}
- last_run = document.getElementById('last');
- if (last_run) {
- last_run.textContent = rtRes.lastRun || '-';
+ infLast = document.getElementById('last');
+ if (infLast) {
+ infLast.textContent = rtRes.lastRun || '-';
+ }
+ infSys = document.getElementById('sys');
+ if (infSys) {
+ infSys.textContent = rtRes.sysInfo || '-';
}
}
} else {
E('label', { 'class': 'cbi-value-title', 'style': 'margin-bottom:-5px;padding-top:0rem;' }, _('Last Run')),
E('div', { 'class': 'cbi-value-field', 'id': 'last', 'style': 'margin-bottom:-5px;color:#37c;' }, '-')
]),
+ E('div', { 'class': 'cbi-value' }, [
+ E('label', { 'class': 'cbi-value-title', 'style': 'margin-bottom:-5px;padding-top:0rem;' }, _('System Info')),
+ E('div', { 'class': 'cbi-value-field', 'id': 'sys', 'style': 'margin-bottom:-5px;color:#37c;' }, '-')
+ ])
]);
}, o, this);
this.pollData;