Merge pull request #3288 from Icinga/bugfix/performance-problem-lots-of-performance-data-2894

Performance data: render pie charts without freezing the UI
This commit is contained in:
lippserd 2018-01-19 16:16:54 +01:00 committed by GitHub
commit 0b9ae48530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,13 +15,17 @@
Sparkline.prototype.onRendered = function(e) { Sparkline.prototype.onRendered = function(e) {
$(e.target).find('.sparkline').each(function() { $(e.target).find('.sparkline').each(function() {
$(this).sparkline('html', { setTimeout(sparkline, 0, $(this));
enableTagOptions: true,
disableTooltips: true
});
}); });
}; };
Icinga.Behaviors.Sparkline = Sparkline; Icinga.Behaviors.Sparkline = Sparkline;
function sparkline(selector) {
selector.sparkline('html', {
enableTagOptions: true,
disableTooltips: true
});
}
})(Icinga, jQuery); })(Icinga, jQuery);