From 9b5a6f0e40b05b5aeedfb5d84a485b81d7f69cbb Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 19 Mar 2022 19:03:09 +0100 Subject: [PATCH 1/2] feat(ui): make aggregation function optional in Flux Query Builder --- .../fluxQueryBuilder/AggregationSelector.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ui/src/shared/components/TimeMachine/fluxQueryBuilder/AggregationSelector.tsx b/ui/src/shared/components/TimeMachine/fluxQueryBuilder/AggregationSelector.tsx index 7ffb3bf670..e3ac0d8f3b 100644 --- a/ui/src/shared/components/TimeMachine/fluxQueryBuilder/AggregationSelector.tsx +++ b/ui/src/shared/components/TimeMachine/fluxQueryBuilder/AggregationSelector.tsx @@ -2,7 +2,6 @@ import React from 'react' import {connect} from 'react-redux' import {notify as notifyAction} from 'src/shared/actions/notifications' -import {fluxWizardError} from 'src/shared/copy/notifications' import {ComponentSize, SlideToggle} from 'src/reusable_ui' import ReactTooltip from 'react-tooltip' @@ -122,16 +121,7 @@ const AggregationSelector = (props: Props & {children?: JSX.Element}) => { const newSelected = active ? selectedFunctions.filter(x => x !== fn) : [fn, ...selectedFunctions] - // at least one function must be selected - if (newSelected.length) { - setSelectedFunctions(newSelected) - } else { - props.notify( - fluxWizardError( - 'You must have at least one aggregation function selected' - ) - ) - } + setSelectedFunctions(newSelected) } const id = `flx-agrselect${fn}` From 75585c39ba0048750455cc603015c8fa6ceabe1e Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Sat, 19 Mar 2022 19:05:57 +0100 Subject: [PATCH 2/2] chore: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4261ddeba..276bf1f20a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ 1. [#5881](https://github.com/influxdata/chronograf/pull/5881): Highlight that Script Builder keys/values depend on the selected time range. 1. [#5856](https://github.com/influxdata/chronograf/pull/5856): Add alert rule options to not send alert on state recovery and send regardless of state change. +1. [#5893](https://github.com/influxdata/chronograf/pull/5893): Make aggregation function selection optional. ### Bug Fixes