diff --git a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx index b8620b461f3..baf49fa2301 100644 --- a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx +++ b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.tsx @@ -63,7 +63,6 @@ export class StackdriverTemplateQueryComponent extends PureComponent q.value === this.state.selectedQueryType); - this.props.onChange(queryModel, `Stackdriver - ${queryName.name}`); + const query = this.queryTypes.find(q => q.value === this.state.selectedQueryType); + this.props.onChange(queryModel, `Stackdriver - ${query.name}`); } isLabelQuery(queryType) {