From aef8a08d3a0ead23d302d509c4f314795f31333f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 24 Jun 2020 09:49:47 +0200 Subject: [PATCH] Fixed merge issue --- .../stackdriver/components/VariableQueryEditor.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx b/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx index 384e055de0d..c5bc0641245 100644 --- a/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx +++ b/public/app/plugins/datasource/stackdriver/components/VariableQueryEditor.tsx @@ -143,6 +143,12 @@ export class StackdriverVariableQueryEditor extends PureComponent this.onPropsChange()); } + onPropsChange = () => { + const { metricDescriptors, labels, metricTypes, services, ...queryModel } = this.state; + const query = this.queryTypes.find(q => q.value === this.state.selectedQueryType); + this.props.onChange(queryModel, `Stackdriver - ${query.name}`); + }; + componentDidUpdate(prevProps: Readonly, prevState: Readonly) { const selectSLOServiceChanged = this.state.selectedSLOService !== prevState.selectedSLOService; if (