TablePanel: Fix annotations display issue (backport) (#17785)
This commit is contained in:
committed by
Torkel Ödegaard
parent
6082d19825
commit
e7710675ec
@@ -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)) {
|
||||
|
||||
@@ -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 };
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user