diff --git a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx
index e603c5581ab..f33154f65d9 100644
--- a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx
+++ b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx
@@ -105,7 +105,7 @@ export class StackdriverTemplateQueryComponent extends PureComponent
- );
-
- metricTypesPicker = (
-
- );
-
- labelPicker = (
- ({ value: l, name: l }))}
- onValueChange={this.onLabelKeyChange}
- label={
- this.state.selectedQueryType === MetricFindQueryTypes.ResourceLabels ? 'Resource Label Key' : 'Metric Label Key'
- }
- />
- );
-
renderQueryTypeSwitch(queryType) {
switch (queryType) {
case MetricFindQueryTypes.MetricTypes:
- return this.servicePicker;
+ return (
+
+ );
case MetricFindQueryTypes.MetricLabels:
case MetricFindQueryTypes.ResourceLabels:
case MetricFindQueryTypes.ResourceTypes:
return (
- {this.servicePicker}
- {this.metricTypesPicker}
- {queryType !== MetricFindQueryTypes.ResourceTypes && this.labelPicker}
+
+
+ {queryType !== MetricFindQueryTypes.ResourceTypes && (
+ ({ value: l, name: l }))}
+ onValueChange={this.onLabelKeyChange}
+ label={
+ this.state.selectedQueryType === MetricFindQueryTypes.ResourceLabels
+ ? 'Resource Label Key'
+ : 'Metric Label Key'
+ }
+ />
+ )}
);
case MetricFindQueryTypes.Alignerns:
case MetricFindQueryTypes.Aggregations:
return (
- {this.servicePicker}
- {this.metricTypesPicker}
+
+
);
default: