Commit b989e2ce by Mitsuhiro Tanda

minor fix

parent 25f08ddd
...@@ -209,7 +209,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) { ...@@ -209,7 +209,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
if (ec2InstanceAttributeQuery) { if (ec2InstanceAttributeQuery) {
region = templateSrv.replace(ec2InstanceAttributeQuery[1]); region = templateSrv.replace(ec2InstanceAttributeQuery[1]);
var filterJson = JSON.parse(templateSrv.replace(ec2InstanceAttributeQuery[3])); var filterJson = JSON.parse(templateSrv.replace(ec2InstanceAttributeQuery[3]));
var filter = _.map(filterJson, function(values, name) { var filters = _.map(filterJson, function(values, name) {
return { return {
Name: name, Name: name,
Values: values Values: values
...@@ -217,7 +217,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) { ...@@ -217,7 +217,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
}); });
var targetAttributeName = templateSrv.replace(ec2InstanceAttributeQuery[2]); var targetAttributeName = templateSrv.replace(ec2InstanceAttributeQuery[2]);
return this.performEC2DescribeInstances(region, filter, null).then(function(result) { return this.performEC2DescribeInstances(region, filters, null).then(function(result) {
var attributes = _.chain(result.Reservations) var attributes = _.chain(result.Reservations)
.map(function(reservations) { .map(function(reservations) {
return _.pluck(reservations.Instances, targetAttributeName); return _.pluck(reservations.Instances, targetAttributeName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment