diff options
author | Dirk Brenken <dev@brenken.org> | 2020-04-17 07:42:24 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2020-04-17 07:42:24 +0200 |
commit | 65958c499295d23b592e6027cfb79827e9150ea8 (patch) | |
tree | 4517322f6411c2d45382cd754c4c937e6c55e74d /applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js | |
parent | a8366b01b7c8a7314c9423821ee361cb566c628e (diff) |
luci-app-adblock: re-apply poll/view class changes
* re-apply poll/view class changes in master after 19.07-branch
split off
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js')
-rw-r--r-- | applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js index 64f23b14c..4dc2a2e53 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js @@ -1,7 +1,9 @@ '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), @@ -10,7 +12,7 @@ return L.view.extend({ }, 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) { |