diff --git a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx index 1f31b4aafc5..df50de45c86 100644 --- a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx +++ b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx @@ -49,7 +49,13 @@ export class StackdriverTemplateQueryComponent extends PureComponent ({ value: l, name: l }))} - onValueChange={this.onLabelKeyChange} - label="Resource Labels" - /> - ); - case MetricFindQueryTypes.MetricLabels: - return ( - ({ value: l, name: l }))} - onValueChange={this.onLabelKeyChange} - label="Metric Labels" - /> - ); - default: - return ''; - } - } - renderQueryTypeSwitch(queryType) { switch (queryType) { case MetricFindQueryTypes.MetricTypes: @@ -146,10 +127,8 @@ export class StackdriverTemplateQueryComponent extends PureComponent - {this.state.labels.join(',')} - {labelSelect} + ({ value: l, name: l }))} + onValueChange={this.onLabelKeyChange} + label={ + this.state.type === MetricFindQueryTypes.ResourceLabels ? 'Resource Label Key' : 'Metric Label Key' + } + /> ); case MetricFindQueryTypes.Alignerns: