mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Skip Angular error handling when Angular support is disabled (#49311)
This commit is contained in:
parent
2d48e75e88
commit
c78b1fb304
@ -19,6 +19,7 @@ import {
|
||||
QueryFixAction,
|
||||
toLegacyResponseData,
|
||||
} from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import {
|
||||
buildQueryTransaction,
|
||||
ensureQueries,
|
||||
@ -834,7 +835,8 @@ export const processQueryResponse = (
|
||||
}
|
||||
|
||||
// Send error to Angular editors
|
||||
if (state.datasourceInstance?.components?.QueryCtrl) {
|
||||
// When angularSupportEnabled is removed we can remove this code and all references to eventBridge
|
||||
if (config.angularSupportEnabled && state.datasourceInstance?.components?.QueryCtrl) {
|
||||
state.eventBridge.emit(PanelEvents.dataError, error);
|
||||
}
|
||||
}
|
||||
@ -844,7 +846,8 @@ export const processQueryResponse = (
|
||||
}
|
||||
|
||||
// Send legacy data to Angular editors
|
||||
if (state.datasourceInstance?.components?.QueryCtrl) {
|
||||
// When angularSupportEnabled is removed we can remove this code and all references to eventBridge
|
||||
if (config.angularSupportEnabled && state.datasourceInstance?.components?.QueryCtrl) {
|
||||
const legacy = series.map((v) => toLegacyResponseData(v));
|
||||
state.eventBridge.emit(PanelEvents.dataReceived, legacy);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user