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

pull/18483/head
Ryan McKinley 6 years ago committed by Torkel Ödegaard
parent 6082d19825
commit e7710675ec
  1. 6
      public/app/features/panel/metrics_panel_ctrl.ts
  2. 6
      public/app/plugins/panel/table/module.ts

@ -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 };
});
}

Loading…
Cancel
Save