mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
construct the datasource for the example query if not added (#57936)
This commit is contained in:
@@ -318,6 +318,10 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
|||||||
};
|
};
|
||||||
|
|
||||||
onClickExample = (query: TQuery) => {
|
onClickExample = (query: TQuery) => {
|
||||||
|
if (query.datasource === undefined) {
|
||||||
|
query.datasource = { type: this.props.dataSource.type, uid: this.props.dataSource.uid };
|
||||||
|
}
|
||||||
|
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
...query,
|
...query,
|
||||||
refId: this.props.query.refId,
|
refId: this.props.query.refId,
|
||||||
|
|||||||
Reference in New Issue
Block a user