summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-03 10:00:06 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-03 10:00:06 +0200
commit3c4bc228a1f7b5731cf464f3f407c9ed9ace3cd2 (patch)
treed9ac0458c66dfa3c5d4922314df9d41499f578bc /applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js
parent1099aebdee29b8e5408688d0fd64d49e6ec4bd35 (diff)
treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js')
-rw-r--r--applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js
index f1e69b89ce..838af8c661 100644
--- a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js
+++ b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js
@@ -1,4 +1,7 @@
'use strict';
+'require view';
+'require dom';
+'require poll';
'require ui';
'require uci';
'require statistics.rrdtool as rrdtool';
@@ -7,7 +10,7 @@ var pollFn = null,
activePlugin = null,
activeInstance = null;
-return L.view.extend({
+return view.extend({
load: function() {
return rrdtool.load();
},
@@ -22,7 +25,7 @@ return L.view.extend({
activePlugin = plugin;
- L.dom.content(container, [
+ dom.content(container, [
E('p', {}, [
E('em', { 'class': 'spinning' }, [ _('Loading data…') ])
])
@@ -52,7 +55,7 @@ return L.view.extend({
})).then(function(blobs) {
var multiple = blobs.length > 1;
- L.dom.content(container, E('div', {}, blobs.map(function(blobs, i) {
+ dom.content(container, E('div', {}, blobs.map(function(blobs, i) {
var plugin_instance = i ? plugin_instances[i-1] : plugin_instances.join('|'),
title = '%s: %s'.format(rrdtool.pluginTitle(plugin), i ? plugin_instance : _('Overview'));
@@ -85,7 +88,7 @@ return L.view.extend({
URL.revokeObjectURL(img.src);
});
- L.dom.content(container, null);
+ dom.content(container, null);
if (container.hasAttribute('data-initialized')) {
container.removeAttribute('data-initialized');
@@ -147,13 +150,13 @@ return L.view.extend({
var btn = ev.currentTarget;
if (pollFn) {
- L.Poll.remove(pollFn);
+ poll.remove(pollFn);
pollFn = null;
}
if (time.value != '0') {
pollFn = L.bind(this.refreshGraphs, this, host, span, time, container);
- L.Poll.add(pollFn, +time.value);
+ poll.add(pollFn, +time.value);
}
},