diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-03 10:00:06 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-03 10:00:06 +0200 |
commit | 3c4bc228a1f7b5731cf464f3f407c9ed9ace3cd2 (patch) | |
tree | d9ac0458c66dfa3c5d4922314df9d41499f578bc /applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logread.js | |
parent | 1099aebdee29b8e5408688d0fd64d49e6ec4bd35 (diff) |
treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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) { |