From ebcb8be19a3aab98f9c1e49c646a9309f02d7d51 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Wed, 1 Nov 2017 18:47:21 +0900 Subject: [PATCH] add period alias --- pkg/tsdb/cloudwatch/cloudwatch.go | 1 + .../plugins/datasource/cloudwatch/partials/query.parameter.html | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/tsdb/cloudwatch/cloudwatch.go b/pkg/tsdb/cloudwatch/cloudwatch.go index 266b71ec14e..1a2cda80d08 100644 --- a/pkg/tsdb/cloudwatch/cloudwatch.go +++ b/pkg/tsdb/cloudwatch/cloudwatch.go @@ -287,6 +287,7 @@ func formatAlias(query *CloudWatchQuery, stat string, dimensions map[string]stri data["namespace"] = query.Namespace data["metric"] = query.MetricName data["stat"] = stat + data["period"] = strconv.Itoa(query.Period) for k, v := range dimensions { data[k] = v } diff --git a/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html b/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html index 67351358696..fd14fb7d077 100644 --- a/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html +++ b/public/app/plugins/datasource/cloudwatch/partials/query.parameter.html @@ -49,6 +49,7 @@
  • {{stat}}
  • {{namespace}}
  • {{region}}
  • +
  • {{period}}
  • {{YOUR_DIMENSION_NAME}}