[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 067ea66cbb)
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
This commit is contained in:
co-authored by
Alexa V
parent
e9ba21cd12
commit
13d48d3aa3
@@ -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<Props> {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.ref) {
|
||||
// check if angular support is enabled in the instance
|
||||
const isAngularEnabled = config.angularSupportEnabled;
|
||||
if (this.ref && isAngularEnabled) {
|
||||
this.loadAngular();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user