From 13d48d3aa39630986c3ac5cc6acb33c20171c1e8 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:37:37 +0300 Subject: [PATCH] [v11.2.x] Dashboard: Annotations - Fix issue of `angularEditorLoader` when angular is not supported (#93598) Dashboard: Annotations - Fix issue of `angularEditorLoader` when angular is not supported (#93583) Dashboard: Annotations - Fix issue of angularEditorLoader when angular is not supported (cherry picked from commit 067ea66cbb1905122a2ec055b55a6c11c280f253) Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com> --- .../settings/annotations/AngularEditorLoader.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx b/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx index edd42f4b7ff..5f24391fbbb 100644 --- a/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx +++ b/public/app/features/dashboard-scene/settings/annotations/AngularEditorLoader.tsx @@ -1,7 +1,7 @@ import { PureComponent } from 'react'; import { AnnotationQuery, DataSourceApi } from '@grafana/data'; -import { AngularComponent, getAngularLoader } from '@grafana/runtime'; +import { AngularComponent, config, getAngularLoader } from '@grafana/runtime'; export interface Props { annotation: AnnotationQuery; @@ -29,7 +29,9 @@ export class AngularEditorLoader extends PureComponent { } componentDidMount() { - if (this.ref) { + // check if angular support is enabled in the instance + const isAngularEnabled = config.angularSupportEnabled; + if (this.ref && isAngularEnabled) { this.loadAngular(); } }