mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Query editor: Allow query editors to create new query (#55028)
* Query editor: Allow query editors to create new query
* Update
* Revert "Update"
This reverts commit d5b79d60dd
.
This commit is contained in:
parent
2c622b912a
commit
e70395f07a
@ -382,6 +382,7 @@ export interface QueryEditorProps<
|
|||||||
onRunQuery: () => void;
|
onRunQuery: () => void;
|
||||||
onChange: (value: TVQuery) => void;
|
onChange: (value: TVQuery) => void;
|
||||||
onBlur?: () => void;
|
onBlur?: () => void;
|
||||||
|
onAddQuery?: (query: TQuery) => void;
|
||||||
/**
|
/**
|
||||||
* Contains query response filtered by refId of QueryResultBase and possible query error
|
* Contains query response filtered by refId of QueryResultBase and possible query error
|
||||||
*/
|
*/
|
||||||
|
@ -230,7 +230,7 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderPluginEditor = () => {
|
renderPluginEditor = () => {
|
||||||
const { query, onChange, queries, onRunQuery, app = CoreApp.PanelEditor, history } = this.props;
|
const { query, onChange, queries, onRunQuery, onAddQuery, app = CoreApp.PanelEditor, history } = this.props;
|
||||||
const { datasource, data } = this.state;
|
const { datasource, data } = this.state;
|
||||||
|
|
||||||
if (datasource?.components?.QueryCtrl) {
|
if (datasource?.components?.QueryCtrl) {
|
||||||
@ -248,6 +248,7 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
|||||||
datasource={datasource}
|
datasource={datasource}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
onRunQuery={onRunQuery}
|
onRunQuery={onRunQuery}
|
||||||
|
onAddQuery={onAddQuery}
|
||||||
data={data}
|
data={data}
|
||||||
range={getTimeSrv().timeRange()}
|
range={getTimeSrv().timeRange()}
|
||||||
queries={queries}
|
queries={queries}
|
||||||
|
Loading…
Reference in New Issue
Block a user