diff --git a/public/app/plugins/datasource/stackdriver/components/SimpleDropdown.tsx b/public/app/plugins/datasource/stackdriver/components/SimpleDropdown.tsx index ff08229c07a..b701924333f 100644 --- a/public/app/plugins/datasource/stackdriver/components/SimpleDropdown.tsx +++ b/public/app/plugins/datasource/stackdriver/components/SimpleDropdown.tsx @@ -8,31 +8,15 @@ interface Props { } const SimpleDropdown: SFC = props => { + const { label, onValueChange, value, options } = props; return (
- {props.label} + {label}
- -
-
- ); -}; - -export const KeyValueDropdown: SFC = props => { - return ( -
- {props.label} -
- + {options.map(({ value, name }, i) => ( + ))} diff --git a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx index 311c4c9a149..1f31b4aafc5 100644 --- a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx +++ b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx @@ -1,5 +1,5 @@ import React, { PureComponent } from 'react'; -import SimpleDropdown, { KeyValueDropdown } from './SimpleDropdown'; +import SimpleDropdown from './SimpleDropdown'; import { TemplateQueryProps } from 'app/types/plugins'; import { getMetricTypesByService, extractServicesFromMetricDescriptors } from '../functions'; import defaultsDeep from 'lodash/defaultsDeep'; @@ -113,7 +113,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent ({ value: l, name: l }))} onValueChange={this.onLabelKeyChange} label="Resource Labels" /> @@ -122,7 +122,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent ({ value: l, name: l }))} onValueChange={this.onLabelKeyChange} label="Metric Labels" /> @@ -136,7 +136,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent {this.state.labels.join(',')} - - - - -