Removed unnecessary _.flatten
This commit is contained in:
@@ -149,8 +149,7 @@ function (angular, _, dateMath) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return getHistory.then(function (timeseries) {
|
return getHistory.then(function (timeseries_data) {
|
||||||
var timeseries_data = _.flatten(timeseries);
|
|
||||||
return _.map(timeseries_data, function (timeseries) {
|
return _.map(timeseries_data, function (timeseries) {
|
||||||
|
|
||||||
// Series downsampling
|
// Series downsampling
|
||||||
@@ -212,8 +211,9 @@ function (angular, _, dateMath) {
|
|||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
return $q.all(_.flatten(promises)).then(function (results) {
|
return $q.all(_.flatten(promises))
|
||||||
var timeseries_data = _.flatten(results);
|
.then(_.flatten)
|
||||||
|
.then(function (timeseries_data) {
|
||||||
return { data: timeseries_data };
|
return { data: timeseries_data };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user