mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
stackdriver: make it impossible to select no aggregation when a group by is selected
This commit is contained in:
parent
cdcb14f3e6
commit
3572692fd5
@ -65,6 +65,12 @@ export class StackdriverAggregationCtrl {
|
||||
const newValue = this.aggOptions.find(o => o.value !== 'REDUCE_NONE');
|
||||
this.target.aggregation.crossSeriesReducer = newValue ? newValue.value : '';
|
||||
}
|
||||
|
||||
if (this.target.aggregation.groupBys.length > 0) {
|
||||
this.aggOptions = this.aggOptions.filter(o => o.value !== 'REDUCE_NONE');
|
||||
const newValue = this.aggOptions.find(o => o.value !== 'REDUCE_NONE');
|
||||
this.target.aggregation.crossSeriesReducer = newValue ? newValue.value : '';
|
||||
}
|
||||
}
|
||||
|
||||
formatAlignmentText() {
|
||||
|
@ -241,6 +241,7 @@ export class StackdriverFilterCtrl {
|
||||
|
||||
this.target.aggregation.groupBys = this.groupBySegments.reduce(reducer, []);
|
||||
this.ensurePlusButton(this.groupBySegments);
|
||||
this.$rootScope.$broadcast('metricTypeChanged');
|
||||
this.$scope.refresh();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user