Commit 728e96e1 by Mitsuhiro Tanda

fix invalid query filter

parent dcb5ea58
......@@ -32,7 +32,11 @@ function (angular, _, moment, dateMath, kbn, templatingVariable, CloudWatchAnnot
options.targets = this.expandTemplateVariable(options.targets, options.scopedVars, templateSrv);
var queries = _.filter(options.targets, function (item) {
return item.hide !== true || !item.namespace || !item.metricName || _.isEmpty(item.statistics);
return item.hide !== true &&
!!item.region &&
!!item.namespace &&
!!item.metricName &&
!_.isEmpty(item.statistics);
}).map(function (item) {
item.region = templateSrv.replace(item.region, options.scopedVars);
item.namespace = templateSrv.replace(item.namespace, options.scopedVars);
......
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