diff --git a/public/app/features/panel/metrics_panel_ctrl.ts b/public/app/features/panel/metrics_panel_ctrl.ts index b8ee1cff372..c10299f2354 100644 --- a/public/app/features/panel/metrics_panel_ctrl.ts +++ b/public/app/features/panel/metrics_panel_ctrl.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)) { diff --git a/public/app/plugins/panel/table/module.ts b/public/app/plugins/panel/table/module.ts index 24f396918d6..19eda953ecd 100644 --- a/public/app/plugins/panel/table/module.ts +++ b/public/app/plugins/panel/table/module.ts @@ -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 }; }); }