'use strict';
-'require view';
-'require poll';
'require fs';
-return view.extend({
+return L.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;
- poll.add(function() {
+ L.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';
}
}
- poll.start();
+ L.Poll.start();
fs.exec_direct('/etc/init.d/adblock', [ev])
var running = 1;
while (running === 1) {
}
})
}
- poll.stop();
+ L.Poll.stop();
}
-return view.extend({
+return L.view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['list']), {}),
/*
poll runtime information
*/
- pollData: poll.add(function() {
+ pollData: L.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");
- poll.stop();
+ L.Poll.stop();
}
}
if (status.textContent.substr(0,6) === 'paused' && document.getElementById('btn_suspend')) {