Просмотр исходного кода

stackdriver: fix alignment period bug

Erik Sundell 7 лет назад
Родитель
Сommit
9351b56e57
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts

+ 1 - 3
public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts

@@ -20,7 +20,6 @@ export class StackdriverAggregation {
 
 
 export class StackdriverAggregationCtrl {
 export class StackdriverAggregationCtrl {
   alignmentPeriods: any[];
   alignmentPeriods: any[];
-  alignmentPeriod: string;
   aggOptions: any[];
   aggOptions: any[];
   alignOptions: any[];
   alignOptions: any[];
   target: any;
   target: any;
@@ -28,7 +27,6 @@ export class StackdriverAggregationCtrl {
   constructor(private $scope) {
   constructor(private $scope) {
     this.$scope.ctrl = this;
     this.$scope.ctrl = this;
     this.target = $scope.target;
     this.target = $scope.target;
-    this.alignmentPeriod = $scope.alignmentPeriod;
     this.alignmentPeriods = options.alignmentPeriods;
     this.alignmentPeriods = options.alignmentPeriods;
     this.aggOptions = options.aggOptions;
     this.aggOptions = options.aggOptions;
     this.alignOptions = options.alignOptions;
     this.alignOptions = options.alignOptions;
@@ -67,7 +65,7 @@ export class StackdriverAggregationCtrl {
 
 
   formatAlignmentText() {
   formatAlignmentText() {
     const selectedAlignment = this.alignOptions.find(ap => ap.value === this.target.aggregation.perSeriesAligner);
     const selectedAlignment = this.alignOptions.find(ap => ap.value === this.target.aggregation.perSeriesAligner);
-    return `${kbn.secondsToHms(this.alignmentPeriod)} interval (${selectedAlignment.text})`;
+    return `${kbn.secondsToHms(this.$scope.alignmentPeriod)} interval (${selectedAlignment.text})`;
   }
   }
 }
 }