snapshot: fix legend rendering bug

This commit is contained in:
Alexander Zobnin 2018-03-20 21:33:54 +03:00
parent fdf7a4c435
commit a472d38fbf

View File

@ -78,8 +78,11 @@ class MetricsPanelCtrl extends PanelCtrl {
data = data.data;
}
this.events.emit('data-snapshot-load', data);
return;
// Defer panel rendering till the next digest cycle.
// For some reason snapshot panels don't init at this time, so this helps to avoid rendering issues.
return this.$timeout(() => {
this.events.emit('data-snapshot-load', data);
});
}
// // ignore if we have data stream