Commit 7f8a3a0a by Torkel Ödegaard

dashboard: lazy loading panels as they become visible,fix, removed debunce #5216

parent aee8f0b7
......@@ -180,11 +180,11 @@ module.directive('grafanaPanel', function($rootScope, $document) {
return (0 < position.top) && (position.top < window.innerHeight);
};
const refreshOnScroll = _.debounce(function () {
const refreshOnScroll = function () {
if (ctrl.skippedLastRefresh) {
ctrl.refresh();
}
}, 250);
};
$document.on('scroll', refreshOnScroll);
......
......@@ -411,15 +411,15 @@ function (angular, _, dateMath) {
if (target.filters && target.filters.length > 0) {
query.filters = angular.copy(target.filters);
if(query.filters){
for(var filter_key in query.filters){
if (query.filters){
for (var filter_key in query.filters) {
query.filters[filter_key].filter = templateSrv.replace(query.filters[filter_key].filter, options.scopedVars, 'pipe');
}
}
} else {
query.tags = angular.copy(target.tags);
if(query.tags){
for(var tag_key in query.tags){
if (query.tags){
for (var tag_key in query.tags) {
query.tags[tag_key] = templateSrv.replace(query.tags[tag_key], options.scopedVars, 'pipe');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment