mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 11:20:27 -06:00
stackdriver: typescriptifying controller
This commit is contained in:
parent
b6a918ba79
commit
7f43909390
@ -22,7 +22,7 @@ export class StackdriverAggregationCtrl {
|
||||
aggOptions: any[];
|
||||
refresh: () => void;
|
||||
|
||||
constructor(private $scope) {
|
||||
constructor($scope) {
|
||||
this.aggOptions = options.aggOptions;
|
||||
this.alignOptions = options.alignOptions;
|
||||
$scope.alignmentPeriods = options.alignmentPeriods;
|
||||
@ -33,14 +33,14 @@ export class StackdriverAggregationCtrl {
|
||||
this.refresh = $scope.refresh;
|
||||
}
|
||||
|
||||
onAlignmentChange(newVal) {
|
||||
onAlignmentChange(newVal: string) {
|
||||
if (newVal === 'ALIGN_NONE') {
|
||||
this.target.aggregation.crossSeriesReducer = 'REDUCE_NONE';
|
||||
}
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
onAggregationChange(newVal) {
|
||||
onAggregationChange(newVal: string) {
|
||||
if (newVal !== 'REDUCE_NONE') {
|
||||
const newAlignmentOption = options.alignOptions.find(o => o.value !== 'ALIGN_NONE');
|
||||
this.target.aggregation.perSeriesAligner = newAlignmentOption ? newAlignmentOption.value : '';
|
||||
|
Loading…
Reference in New Issue
Block a user