Replaced old downsampleSeries() method by new
DataProcessingService.groupBy()
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
define([
|
||||
'lodash'
|
||||
'lodash',
|
||||
'moment'
|
||||
],
|
||||
function () {
|
||||
function (_, moment) {
|
||||
'use strict';
|
||||
|
||||
function utils() {
|
||||
@@ -40,6 +41,12 @@ function () {
|
||||
return new RegExp(pattern, flags);
|
||||
};
|
||||
|
||||
this.parseInterval = function(interval) {
|
||||
var intervalPattern = /(^[\d]+)(y|M|w|d|h|m|s)/g;
|
||||
var momentInterval = intervalPattern.exec(interval);
|
||||
return moment.duration(Number(momentInterval[1]), momentInterval[2]).valueOf();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return new utils();
|
||||
|
||||
Reference in New Issue
Block a user