mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudMonitoring: Fixes broken variable queries that use group bys (#43914)
This commit is contained in:
@@ -61,15 +61,15 @@ function Editor({
|
||||
variableOptionGroup,
|
||||
}: React.PropsWithChildren<Props>) {
|
||||
const [state, setState] = useState<State>(defaultState);
|
||||
const { projectName, metricType, groupBys, editorMode } = query;
|
||||
const { projectName, metricType, groupBys, editorMode, crossSeriesReducer } = query;
|
||||
|
||||
useEffect(() => {
|
||||
if (projectName && metricType) {
|
||||
datasource
|
||||
.getLabels(metricType, refId, projectName, groupBys)
|
||||
.getLabels(metricType, refId, projectName, { groupBys, crossSeriesReducer })
|
||||
.then((labels) => setState((prevState) => ({ ...prevState, labels })));
|
||||
}
|
||||
}, [datasource, groupBys, metricType, projectName, refId]);
|
||||
}, [datasource, groupBys, metricType, projectName, refId, crossSeriesReducer]);
|
||||
|
||||
const onChange = useCallback(
|
||||
(metricQuery: MetricQuery | SLOQuery) => {
|
||||
|
||||
Reference in New Issue
Block a user