stackdriver: fix alignment period bug

This commit is contained in:
Erik Sundell 2018-09-27 15:59:17 +02:00
parent a028df658a
commit 9351b56e57
1 changed files with 1 additions and 3 deletions

View File

@ -20,7 +20,6 @@ export class StackdriverAggregation {
export class StackdriverAggregationCtrl {
alignmentPeriods: any[];
alignmentPeriod: string;
aggOptions: any[];
alignOptions: any[];
target: any;
@ -28,7 +27,6 @@ export class StackdriverAggregationCtrl {
constructor(private $scope) {
this.$scope.ctrl = this;
this.target = $scope.target;
this.alignmentPeriod = $scope.alignmentPeriod;
this.alignmentPeriods = options.alignmentPeriods;
this.aggOptions = options.aggOptions;
this.alignOptions = options.alignOptions;
@ -67,7 +65,7 @@ export class StackdriverAggregationCtrl {
formatAlignmentText() {
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})`;
}
}