'use strict';
+'require view';
+'require poll';
'require fs';
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.stat('/sbin/logread'), null),
},
render: function(stat) {
var logger = stat[0] ? stat[0].path : stat[1] ? stat[1].path : null;
- L.Poll.add(function() {
+ poll.add(function() {
return L.resolveDefault(fs.exec_direct(logger, ['-e', 'adblock-'])).then(function(res) {
var log = document.getElementById("logfile");
if (res) {
'use strict';
+'require view';
+'require poll';
'require fs';
'require ui';
'require uci';
}
}
- L.Poll.start();
+ poll.start();
fs.exec_direct('/etc/init.d/adblock', [ev])
var running = 1;
while (running === 1) {
}
})
}
- L.Poll.stop();
+ poll.stop();
}
-return L.view.extend({
+return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['list']), {}),
/*
poll runtime information
*/
- pollData: L.Poll.add(function() {
+ pollData: poll.add(function() {
return L.resolveDefault(fs.read_direct('/tmp/adb_runtime.json'), 'null').then(function(res) {
var info = JSON.parse(res);
var status = document.getElementById('status');
} else {
if (status.classList.contains("spinning")) {
status.classList.remove("spinning");
- L.Poll.stop();
+ poll.stop();
}
}
if (status.textContent.substr(0,6) === 'paused' && document.getElementById('btn_suspend')) {