Enable selecting derivative function in query builder

pull/11454/head
Christopher Henn 2019-01-22 16:11:39 -08:00 committed by Chris Henn
parent 949044331f
commit 102530b1c8
1 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,5 @@
import {WINDOW_PERIOD} from 'src/shared/constants'
export interface QueryFn {
name: string
flux: string
@ -10,6 +12,11 @@ export const FUNCTIONS: QueryFn[] = [
{name: 'max', flux: '|> max()', aggregate: true},
{name: 'min', flux: '|> min()', aggregate: true},
{name: 'sum', flux: '|> sum()', aggregate: true},
{
name: 'derivative',
flux: `|> derivative(unit: ${WINDOW_PERIOD}, nonNegative: false)`,
aggregate: false,
},
{name: 'distinct', flux: '|> distinct()', aggregate: false},
{name: 'count', flux: '|> count()', aggregate: false},
{name: 'increase', flux: '|> increase()', aggregate: false},