Commit d815d06c by Mitsuhiro Tanda

ignore empty custom metrics setting

parent c0c8465e
...@@ -176,7 +176,11 @@ function (angular, _, kbn) { ...@@ -176,7 +176,11 @@ function (angular, _, kbn) {
/* load custom metrics definitions */ /* load custom metrics definitions */
var self = this; var self = this;
$q.all( $q.all(
_.map(datasource.jsonData.customMetricsAttributes, function(u) { _.chain(datasource.jsonData.customMetricsAttributes)
.reject(function(u) {
return _.isEmpty(u);
})
.map(function(u) {
return $http({ method: 'GET', url: u }); return $http({ method: 'GET', url: u });
}) })
) )
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
Custom Metrics Attributes Custom Metrics Attributes
</li> </li>
<li> <li>
<input type="text" class="tight-form-input input-xlarge" ng-model='current.jsonData.customMetricsAttributes[0]' ng-init="current.jsonData.customMetricsAttributes = current.jsonData.customMetricsAttributes || []" placeholder="" required></input> <input type="text" class="tight-form-input input-xlarge" ng-model='current.jsonData.customMetricsAttributes[0]' ng-init="current.jsonData.customMetricsAttributes = current.jsonData.customMetricsAttributes || []" placeholder=""></input>
</li> </li>
</ul> </ul>
<div class="clearfix"></div> <div class="clearfix"></div>
......
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