add consolidateBy() function
This commit is contained in:
11
dist/datasource-zabbix/metricFunctions.js
vendored
11
dist/datasource-zabbix/metricFunctions.js
vendored
@@ -80,7 +80,8 @@ System.register(['lodash', 'jquery'], function (_export, _context) {
|
||||
Filter: [],
|
||||
Trends: [],
|
||||
Time: [],
|
||||
Alias: []
|
||||
Alias: [],
|
||||
Special: []
|
||||
};
|
||||
addFuncDef({
|
||||
name: 'groupBy',
|
||||
@@ -225,6 +226,14 @@ System.register(['lodash', 'jquery'], function (_export, _context) {
|
||||
defaultParams: ['/(.*)/', '$1']
|
||||
});
|
||||
|
||||
// Special
|
||||
addFuncDef({
|
||||
name: 'consolidateBy',
|
||||
category: 'Special',
|
||||
params: [{ name: 'type', type: 'string', options: ['avg', 'min', 'max', 'sum', 'count'] }],
|
||||
defaultParams: ['avg']
|
||||
});
|
||||
|
||||
_.each(categories, function (funcList, catName) {
|
||||
categories[catName] = _.sortBy(funcList, 'name');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user