From 39e112394e792795228ee0e19d5ccd8b08efcf6a Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 27 May 2021 14:21:29 +0300 Subject: [PATCH] Remove legacy functions --- src/datasource-zabbix/metricFunctions.ts | 74 ++++-------------------- 1 file changed, 10 insertions(+), 64 deletions(-) diff --git a/src/datasource-zabbix/metricFunctions.ts b/src/datasource-zabbix/metricFunctions.ts index 2f12b3b..1ba32ff 100644 --- a/src/datasource-zabbix/metricFunctions.ts +++ b/src/datasource-zabbix/metricFunctions.ts @@ -124,6 +124,16 @@ addFuncDef({ // Aggregate +addFuncDef({ + name: 'aggregateBy', + category: 'Aggregate', + params: [ + { name: 'interval', type: 'string' }, + { name: 'function', type: 'string', options: ['avg', 'min', 'max', 'sum', 'count', 'median', 'first', 'last'] } + ], + defaultParams: ['1m', 'avg'], +}); + addFuncDef({ name: 'sumSeries', category: 'Aggregate', @@ -131,24 +141,6 @@ addFuncDef({ defaultParams: [], }); -addFuncDef({ - name: 'median', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string'} - ], - defaultParams: ['1m'], -}); - -addFuncDef({ - name: 'average', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string' } - ], - defaultParams: ['1m'], -}); - addFuncDef({ name: 'percentileAgg', category: 'Aggregate', @@ -159,52 +151,6 @@ addFuncDef({ defaultParams: ['1m', 95], }); -addFuncDef({ - name: 'min', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string' } - ], - defaultParams: ['1m'], -}); - -addFuncDef({ - name: 'max', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string' } - ], - defaultParams: ['1m'], -}); - -addFuncDef({ - name: 'sum', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string' } - ], - defaultParams: ['1m'], -}); - -addFuncDef({ - name: 'count', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string' } - ], - defaultParams: ['1m'], -}); - -addFuncDef({ - name: 'aggregateBy', - category: 'Aggregate', - params: [ - { name: 'interval', type: 'string' }, - { name: 'function', type: 'string', options: ['avg', 'min', 'max', 'sum', 'count', 'median', 'first', 'last'] } - ], - defaultParams: ['1m', 'avg'], -}); - // Filter addFuncDef({