(cherry picked from commit d3b8fc53aa)
Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
This commit is contained in:
co-authored by
Isabella Siu
parent
872727e745
commit
7c2b1cc9d0
@@ -100,6 +100,7 @@ export default class CloudMonitoringMetricFindQuery {
|
||||
return [];
|
||||
}
|
||||
const refId = 'handleLabelValuesQuery';
|
||||
// REDUCE_MEAN is needed so the groupBy is not ignored
|
||||
const labels = await this.datasource.getLabels(selectedMetricType, refId, projectName, {
|
||||
groupBys: [labelKey],
|
||||
crossSeriesReducer: 'REDUCE_MEAN',
|
||||
|
||||
@@ -66,7 +66,7 @@ function Editor({
|
||||
useEffect(() => {
|
||||
if (projectName && metricType) {
|
||||
datasource
|
||||
.getLabels(metricType, refId, projectName, { groupBys, crossSeriesReducer })
|
||||
.getLabels(metricType, refId, projectName)
|
||||
.then((labels) => setState((prevState) => ({ ...prevState, labels })));
|
||||
}
|
||||
}, [datasource, groupBys, metricType, projectName, refId, crossSeriesReducer]);
|
||||
|
||||
Reference in New Issue
Block a user