diff --git a/public/app/plugins/datasource/stackdriver/components/MetricTypePicker.tsx b/public/app/plugins/datasource/stackdriver/components/MetricTypePicker.tsx deleted file mode 100644 index 9d0ad751c56..00000000000 --- a/public/app/plugins/datasource/stackdriver/components/MetricTypePicker.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React, { SFC } from 'react'; -import { getMetricTypesByService } from '../functions'; - -interface Props { - onMetricTypeChange: any; - selectedService: string; - selectedMetricType: string; - metricDescriptors: any[]; - metricTypes: any[]; -} - -const MetricTypePicker: SFC = props => { - const filterMetricTypes = () => { - if (!props.selectedService) { - return []; - } - - return getMetricTypesByService(props.metricDescriptors, props.selectedService).map(m => ({ - value: m.type, - name: m.displayName, - })); - }; - - return ( -
- Metric Types -
- -
-
- ); -}; - -export default MetricTypePicker; diff --git a/public/app/plugins/datasource/stackdriver/components/ServicePicker.tsx b/public/app/plugins/datasource/stackdriver/components/ServicePicker.tsx deleted file mode 100644 index 85320dc3465..00000000000 --- a/public/app/plugins/datasource/stackdriver/components/ServicePicker.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React, { SFC } from 'react'; -import { extractServicesFromMetricDescriptors } from '../functions'; - -interface Props { - selectedService: string; - onServiceChange: any; - metricDescriptors: any[]; -} - -const ServicePicker: SFC = props => { - const extractServices = () => { - return extractServicesFromMetricDescriptors(props.metricDescriptors).map(m => ({ - value: m.service, - name: m.serviceShortName, - })); - }; - - return ( -
- Service -
- -
-
- ); -}; - -export default ServicePicker; diff --git a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx index 751cadbf511..311c4c9a149 100644 --- a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx +++ b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx @@ -107,7 +107,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent {this.state.labels.join(',')} @@ -162,7 +162,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent - {dropdown} + {labelSelect} ); case MetricFindQueryTypes.Alignerns: @@ -191,23 +191,12 @@ export class StackdriverTemplateQueryComponent extends PureComponent -
- Query Type -
- -
-
+ {this.renderQueryTypeSwitch(this.state.type)} );