mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Cloudwatch: Defined explore query editor for cloudwatch (#20909)
* Defined explore query editor for cloudwatch * Fix types
This commit is contained in:
parent
6f4f327887
commit
ab3df98523
@ -49,6 +49,7 @@ const setup = () => {
|
|||||||
matchExact: true,
|
matchExact: true,
|
||||||
},
|
},
|
||||||
datasource,
|
datasource,
|
||||||
|
history: [],
|
||||||
onChange: jest.fn(),
|
onChange: jest.fn(),
|
||||||
onRunQuery: jest.fn(),
|
onRunQuery: jest.fn(),
|
||||||
};
|
};
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React, { PureComponent, ChangeEvent } from 'react';
|
import React, { PureComponent, ChangeEvent } from 'react';
|
||||||
import { SelectableValue, QueryEditorProps } from '@grafana/data';
|
import { SelectableValue, ExploreQueryFieldProps } from '@grafana/data';
|
||||||
import { Input, Segment, SegmentAsync, ValidationEvents, EventsWithValidation, Switch } from '@grafana/ui';
|
import { Input, Segment, SegmentAsync, ValidationEvents, EventsWithValidation, Switch } from '@grafana/ui';
|
||||||
import { CloudWatchQuery } from '../types';
|
import { CloudWatchQuery } from '../types';
|
||||||
import CloudWatchDatasource from '../datasource';
|
import CloudWatchDatasource from '../datasource';
|
||||||
import { SelectableStrings } from '../types';
|
import { SelectableStrings } from '../types';
|
||||||
import { Stats, Dimensions, QueryInlineField, QueryField, Alias } from './';
|
import { Stats, Dimensions, QueryInlineField, QueryField, Alias } from './';
|
||||||
|
|
||||||
export type Props = QueryEditorProps<CloudWatchDatasource, CloudWatchQuery>;
|
export type Props = ExploreQueryFieldProps<CloudWatchDatasource, CloudWatchQuery>;
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
regions: SelectableStrings;
|
regions: SelectableStrings;
|
||||||
|
@ -14,4 +14,5 @@ export const plugin = new DataSourcePlugin<CloudWatchDatasource, CloudWatchQuery
|
|||||||
)
|
)
|
||||||
.setConfigEditor(ConfigEditor)
|
.setConfigEditor(ConfigEditor)
|
||||||
.setQueryEditor(QueryEditor)
|
.setQueryEditor(QueryEditor)
|
||||||
|
.setExploreQueryField(QueryEditor)
|
||||||
.setAnnotationQueryCtrl(CloudWatchAnnotationsQueryCtrl);
|
.setAnnotationQueryCtrl(CloudWatchAnnotationsQueryCtrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user