Skip to content

Commit

Permalink
Cloudwatch: Defined explore query editor for cloudwatch (#20909)
Browse files Browse the repository at this point in the history
* Defined explore query editor for cloudwatch

* Fix types
  • Loading branch information
davkal committed Dec 6, 2019
1 parent 6f4f327 commit ab3df98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Expand Up @@ -49,6 +49,7 @@ const setup = () => {
matchExact: true,
},
datasource,
history: [],
onChange: jest.fn(),
onRunQuery: jest.fn(),
};
Expand Down
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions public/app/plugins/datasource/cloudwatch/module.tsx
Expand Up @@ -14,4 +14,5 @@ export const plugin = new DataSourcePlugin<CloudWatchDatasource, CloudWatchQuery
)
.setConfigEditor(ConfigEditor)
.setQueryEditor(QueryEditor)
.setExploreQueryField(QueryEditor)
.setAnnotationQueryCtrl(CloudWatchAnnotationsQueryCtrl);

0 comments on commit ab3df98

Please sign in to comment.