mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
dashboard: lazy loading panels as they become visible,fix, removed debunce #5216
This commit is contained in:
parent
aee8f0b75e
commit
7f8a3a0a2d
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user