mirror of
https://github.com/grafana/grafana.git
synced 2025-01-26 16:27:02 -06:00
Explore: Restricts query text edit toggle to metrics mode (#17921)
* Explore: Adds datasource plugin config option 'modesSupportingTextEdit' This allows one to specify which modes support toggling query text edit on and off Closes #17904 * Explore: Restricts query text edit toggle to metrics mode
This commit is contained in:
parent
cf37b5439f
commit
3a18098760
@ -129,7 +129,8 @@ export class QueryRow extends PureComponent<QueryRowProps, QueryRowState> {
|
||||
queryErrors,
|
||||
mode,
|
||||
} = this.props;
|
||||
const canToggleEditorModes = _.has(datasourceInstance, 'components.QueryCtrl.prototype.toggleEditorMode');
|
||||
const canToggleEditorModes =
|
||||
mode === ExploreMode.Metrics && _.has(datasourceInstance, 'components.QueryCtrl.prototype.toggleEditorMode');
|
||||
let QueryField;
|
||||
|
||||
if (mode === ExploreMode.Metrics && datasourceInstance.components.ExploreMetricsQueryField) {
|
||||
|
Loading…
Reference in New Issue
Block a user