stackdriver: rename query variable

This commit is contained in:
Erik Sundell 2018-11-09 13:44:58 +01:00
parent f14b3e7fcf
commit 5424603052

View File

@ -63,7 +63,6 @@ export class StackdriverTemplateQueryComponent extends PureComponent<TemplateQue
metricDescriptors,
...await this.getLabels(selectedMetricType),
};
console.log(state);
this.setState(state);
}
@ -101,8 +100,8 @@ export class StackdriverTemplateQueryComponent extends PureComponent<TemplateQue
componentDidUpdate() {
const { metricDescriptors, labels, metricTypes, services, ...queryModel } = this.state;
const queryName = this.queryTypes.find(q => 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) {