mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 20:54:22 -06:00
QueryProcessing: Added missing error event for angular editors (#19059)
* QueryProcessing: Added missing error event for angular editors * fix if else
This commit is contained in:
parent
076a8fc85c
commit
b6c501bc8a
@ -274,8 +274,12 @@ function notifyAngularQueryEditorsOfData(panel: PanelModel, data: PanelData, edi
|
||||
|
||||
globalLastPanelDataCache = data;
|
||||
|
||||
const legacy = data.series.map(v => toLegacyResponseData(v));
|
||||
panel.events.emit('data-received', legacy);
|
||||
if (data.state === LoadingState.Done) {
|
||||
const legacy = data.series.map(v => toLegacyResponseData(v));
|
||||
panel.events.emit('data-received', legacy);
|
||||
} else if (data.state === LoadingState.Error) {
|
||||
panel.events.emit('data-error', data.error);
|
||||
}
|
||||
|
||||
// Some query controllers listen to data error events and need a digest
|
||||
// for some reason this needs to be done in next tick
|
||||
|
Loading…
Reference in New Issue
Block a user