TablePanel: Fix annotations display issue (backport) (#17785)

This commit is contained in:
Ryan McKinley
2019-06-27 09:49:45 +02:00
committed by Torkel Ödegaard
parent 6082d19825
commit e7710675ec
2 changed files with 7 additions and 5 deletions
@@ -190,6 +190,12 @@ class MetricsPanelCtrl extends PanelCtrl {
result = { data: [] };
}
// Some data is not an array (like table annotations)
if (!Array.isArray(result.data)) {
this.events.emit('data-received', result.data);
return;
}
// Make sure the data is TableData | TimeSeries
const data = result.data.map(v => {
if (isSeriesData(v)) {
+1 -5
View File
@@ -95,11 +95,7 @@ class TablePanelCtrl extends MetricsPanelCtrl {
range: this.range,
})
.then((anno: any) => {
this.loading = false;
this.dataRaw = anno;
this.pageIndex = 0;
this.render();
return { data: this.dataRaw }; // Not used
return { data: anno };
});
}