SQL Datasources: Make QueryEditor lazy loaded (#96179)

* feat(grafana-sql): make sqlqueryeditor lazy loaded

* feat(sql-datasources): switch out query editor for lazy query editor

* build(postgresql): put tsconfig jsx prop inside compilerOptions

* chore(sql-queryeditor): move lazy import out of component
This commit is contained in:
Jack Westbrook
2024-11-15 12:28:01 +01:00
committed by GitHub
parent 1f34096fdf
commit 329a4605fb
9 changed files with 43 additions and 14 deletions
@@ -30,7 +30,7 @@ import {
} from '@grafana/runtime';
import { ResponseParser } from '../ResponseParser';
import { SqlQueryEditor } from '../components/QueryEditor';
import { SqlQueryEditorLazy } from '../components/QueryEditorLazy';
import { MACRO_NAMES } from '../constants';
import { DB, SQLQuery, SQLOptions, SqlQueryModel, QueryFormat } from '../types';
import migrateAnnotation from '../utils/migration';
@@ -63,7 +63,7 @@ export abstract class SqlDatasource extends DataSourceWithBackend<SQLQuery, SQLO
this.preconfiguredDatabase = settingsData.database ?? '';
this.annotations = {
prepareAnnotation: migrateAnnotation,
QueryEditor: SqlQueryEditor,
QueryEditor: SqlQueryEditorLazy,
};
}