From 9351b56e576a6f4a888c465a9b279dcfd2aeaf85 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Thu, 27 Sep 2018 15:59:17 +0200 Subject: [PATCH] stackdriver: fix alignment period bug --- .../plugins/datasource/stackdriver/query_aggregation_ctrl.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts b/public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts index fc6a708a45f..50a4f630e50 100644 --- a/public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts +++ b/public/app/plugins/datasource/stackdriver/query_aggregation_ctrl.ts @@ -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})`; } }