From ab3df985234a400f9d90ab04d09f7b8fb1caba2e Mon Sep 17 00:00:00 2001 From: David Date: Fri, 6 Dec 2019 16:04:31 +0100 Subject: [PATCH] Cloudwatch: Defined explore query editor for cloudwatch (#20909) * Defined explore query editor for cloudwatch * Fix types --- .../datasource/cloudwatch/components/QueryEditor.test.tsx | 1 + .../plugins/datasource/cloudwatch/components/QueryEditor.tsx | 4 ++-- public/app/plugins/datasource/cloudwatch/module.tsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/cloudwatch/components/QueryEditor.test.tsx b/public/app/plugins/datasource/cloudwatch/components/QueryEditor.test.tsx index aa533b598e8c..08e594edbc62 100644 --- a/public/app/plugins/datasource/cloudwatch/components/QueryEditor.test.tsx +++ b/public/app/plugins/datasource/cloudwatch/components/QueryEditor.test.tsx @@ -49,6 +49,7 @@ const setup = () => { matchExact: true, }, datasource, + history: [], onChange: jest.fn(), onRunQuery: jest.fn(), }; diff --git a/public/app/plugins/datasource/cloudwatch/components/QueryEditor.tsx b/public/app/plugins/datasource/cloudwatch/components/QueryEditor.tsx index 008807d3fe70..da2de2b5b399 100644 --- a/public/app/plugins/datasource/cloudwatch/components/QueryEditor.tsx +++ b/public/app/plugins/datasource/cloudwatch/components/QueryEditor.tsx @@ -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; +export type Props = ExploreQueryFieldProps; interface State { regions: SelectableStrings; diff --git a/public/app/plugins/datasource/cloudwatch/module.tsx b/public/app/plugins/datasource/cloudwatch/module.tsx index ae3e0480ddb2..f341fea986dc 100644 --- a/public/app/plugins/datasource/cloudwatch/module.tsx +++ b/public/app/plugins/datasource/cloudwatch/module.tsx @@ -14,4 +14,5 @@ export const plugin = new DataSourcePlugin