mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed issue with explore angular query editor support introduced by recent angular query editor changes
This commit is contained in:
parent
bc8f3374a3
commit
f2498645d0
@ -51,7 +51,7 @@ export class QueryEditorRow extends PureComponent<Props, State> {
|
|||||||
target: query,
|
target: query,
|
||||||
panel: panel,
|
panel: panel,
|
||||||
refresh: () => panel.refresh(),
|
refresh: () => panel.refresh(),
|
||||||
render: () => panel.render,
|
render: () => panel.render(),
|
||||||
events: panel.events,
|
events: panel.events,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ import React, { PureComponent } from 'react';
|
|||||||
|
|
||||||
// Services
|
// Services
|
||||||
import { getAngularLoader, AngularComponent } from 'app/core/services/AngularLoader';
|
import { getAngularLoader, AngularComponent } from 'app/core/services/AngularLoader';
|
||||||
import { getIntervals } from 'app/core/utils/explore';
|
|
||||||
import { getTimeSrv } from 'app/features/dashboard/time_srv';
|
import { getTimeSrv } from 'app/features/dashboard/time_srv';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
@ -37,8 +36,9 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
|
|||||||
const template = '<plugin-component type="query-ctrl"> </plugin-component>';
|
const template = '<plugin-component type="query-ctrl"> </plugin-component>';
|
||||||
const target = { datasource: datasource.name, ...initialQuery };
|
const target = { datasource: datasource.name, ...initialQuery };
|
||||||
const scopeProps = {
|
const scopeProps = {
|
||||||
target,
|
|
||||||
ctrl: {
|
ctrl: {
|
||||||
|
datasource,
|
||||||
|
target,
|
||||||
refresh: () => {
|
refresh: () => {
|
||||||
this.props.onQueryChange(target, false);
|
this.props.onQueryChange(target, false);
|
||||||
this.props.onExecuteQuery();
|
this.props.onExecuteQuery();
|
||||||
@ -48,11 +48,7 @@ export default class QueryEditor extends PureComponent<QueryEditorProps, any> {
|
|||||||
datasource,
|
datasource,
|
||||||
targets: [target],
|
targets: [target],
|
||||||
},
|
},
|
||||||
dashboard: {
|
dashboard: {},
|
||||||
getNextQueryLetter: x => '',
|
|
||||||
},
|
|
||||||
hideEditorRowActions: true,
|
|
||||||
...getIntervals(range, (datasource || {}).interval, null), // Possible to get resolution?
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user