Cloudwatch: Defined explore query editor for cloudwatch (#20909)

* Defined explore query editor for cloudwatch

* Fix types
This commit is contained in:
David 2019-12-06 16:04:31 +01:00 committed by GitHub
parent 6f4f327887
commit ab3df98523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -49,6 +49,7 @@ const setup = () => {
matchExact: true,
},
datasource,
history: [],
onChange: jest.fn(),
onRunQuery: jest.fn(),
};

View File

@ -1,12 +1,12 @@
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 { CloudWatchQuery } from '../types';
import CloudWatchDatasource from '../datasource';
import { SelectableStrings } from '../types';
import { Stats, Dimensions, QueryInlineField, QueryField, Alias } from './';
export type Props = QueryEditorProps<CloudWatchDatasource, CloudWatchQuery>;
export type Props = ExploreQueryFieldProps<CloudWatchDatasource, CloudWatchQuery>;
interface State {
regions: SelectableStrings;

View File

@ -14,4 +14,5 @@ export const plugin = new DataSourcePlugin<CloudWatchDatasource, CloudWatchQuery
)
.setConfigEditor(ConfigEditor)
.setQueryEditor(QueryEditor)
.setExploreQueryField(QueryEditor)
.setAnnotationQueryCtrl(CloudWatchAnnotationsQueryCtrl);