Performance data: render pie charts without freezing the UI

refs #2894
This commit is contained in:
Alexander A. Klimov 2018-01-19 16:14:42 +01:00
parent 0abff5f643
commit f2b2b6a91a
1 changed files with 8 additions and 4 deletions

View File

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