fix aggregateBy func, fix #498
This commit is contained in:
4
dist/datasource-zabbix/dataProcessor.js
vendored
4
dist/datasource-zabbix/dataProcessor.js
vendored
@@ -65,8 +65,10 @@ System.register(['lodash', './utils', './timeseries'], function (_export, _conte
|
||||
function aggregateByWrapper(interval, aggregateFunc, datapoints) {
|
||||
// Flatten all points in frame and then just use groupBy()
|
||||
var flattenedPoints = _.flatten(datapoints, true);
|
||||
// groupBy_perf works with sorted series only
|
||||
var sortedPoints = ts.sortByTime(flattenedPoints);
|
||||
var groupByCallback = aggregationFunctions[aggregateFunc];
|
||||
return groupBy(flattenedPoints, interval, groupByCallback);
|
||||
return groupBy(sortedPoints, interval, groupByCallback);
|
||||
}
|
||||
|
||||
function aggregateWrapper(groupByCallback, interval, datapoints) {
|
||||
|
||||
Reference in New Issue
Block a user