added opensearch annotations to not use default ui (#50655) (#50751)

(cherry picked from commit d8d3a9c561)
This commit is contained in:
Sven Grossmann
2022-06-14 10:23:08 +02:00
committed by GitHub
parent 6ac398763a
commit 5215514bf3
@@ -235,12 +235,12 @@ export function getAnnotationsFromData(
* Opt out of using the default mapping functionality on frontend.
*/
export function shouldUseMappingUI(datasource: DataSourceApi): boolean {
return datasource.type !== 'prometheus';
return datasource.type !== 'prometheus' && datasource.type !== 'grafana-opensearch-datasource';
}
/**
* Use legacy runner. Used only as an escape hatch for easier transition to React based annotation editor.
*/
export function shouldUseLegacyRunner(datasource: DataSourceApi): boolean {
return datasource.type === 'prometheus';
return datasource.type === 'prometheus' || datasource.type === 'grafana-opensearch-datasource';
}