mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Graphite: Pass date range to auto-complete for metrics (#33707)
This commit is contained in:
parent
8f210db17a
commit
06c24476dc
@ -29,7 +29,7 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
|
||||
return;
|
||||
}
|
||||
|
||||
const { datasource, initialQuery, exploreEvents } = this.props;
|
||||
const { datasource, initialQuery, exploreEvents, range } = this.props;
|
||||
|
||||
const loader = getAngularLoader();
|
||||
const template = '<plugin-component type="query-ctrl"> </plugin-component>';
|
||||
@ -38,6 +38,7 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
|
||||
ctrl: {
|
||||
datasource,
|
||||
target,
|
||||
range,
|
||||
refresh: () => {
|
||||
setTimeout(() => {
|
||||
// the "hide" attribute of the quries can be changed from the "outside",
|
||||
@ -79,6 +80,10 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
|
||||
this.angularScope.toggleEditorMode();
|
||||
}
|
||||
|
||||
if (this.angularScope) {
|
||||
this.angularScope.range = this.props.range;
|
||||
}
|
||||
|
||||
if (hasNewError || hasToggledEditorMode) {
|
||||
// Some query controllers listen to data error events and need a digest
|
||||
// for some reason this needs to be done in next tick
|
||||
|
Loading…
Reference in New Issue
Block a user