diff --git a/CHANGELOG.md b/CHANGELOG.md index aeab62346..60999075d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ 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. 1. [#5894](https://github.com/influxdata/chronograf/pull/5894): Autocomplete builtin `v` object in Flux editor. +1. [#5895](https://github.com/influxdata/chronograf/pull/5895): Warn before overriding the existing Flux Editor script. ### Bug Fixes diff --git a/ui/src/shared/components/TimeMachine/FluxQueryMaker.tsx b/ui/src/shared/components/TimeMachine/FluxQueryMaker.tsx index 37276f946..77ded6d46 100644 --- a/ui/src/shared/components/TimeMachine/FluxQueryMaker.tsx +++ b/ui/src/shared/components/TimeMachine/FluxQueryMaker.tsx @@ -172,6 +172,7 @@ class FluxQueryMaker extends PureComponent { return ( button { + color: #fff; + background: #bf3d5e; + background-image: linear-gradient(45deg, rgb(191, 61, 94) 0%, rgb(249, 95, 83) 100%) + } +} +.fqb--confirm-caret { + content: ""; + width: 0; + height: 0; + position: fixed; + border-top: 6px solid transparent; + border-bottom: 6px solid #ff8564; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + margin-top: -12px; + margin-left: -3px; + z-index: 9999; +} diff --git a/ui/src/shared/components/TimeMachine/fluxQueryBuilder/FluxQueryBuilder.tsx b/ui/src/shared/components/TimeMachine/fluxQueryBuilder/FluxQueryBuilder.tsx index b30bce078..48bf57a61 100644 --- a/ui/src/shared/components/TimeMachine/fluxQueryBuilder/FluxQueryBuilder.tsx +++ b/ui/src/shared/components/TimeMachine/fluxQueryBuilder/FluxQueryBuilder.tsx @@ -9,7 +9,6 @@ import FancyScrollbar from '../../FancyScrollbar' import { Button, ButtonShape, - ComponentColor, ComponentSize, ComponentStatus, IconFont, @@ -18,7 +17,6 @@ import AggregationSelector from './AggregationSelector' import TagSelector from './TagSelector' import {notify as notifyActionCreator} from 'src/shared/actions/notifications' import { - fluxWizardError, notifyCopyToClipboardFailed, notifyCopyToClipboardSuccess, } from 'src/shared/copy/notifications' @@ -28,11 +26,12 @@ import timeRangeWindowPeriod from './util/timeRangeWindowPeriod' import {RemoteDataState, TimeZones} from 'src/types' import {buildQuery} from './util/generateFlux' import {timeRangeLabel} from '../../TimeRangeLabel' +import FluxQueryBuilderSubmit from './FluxQueryBuilderSubmit' interface OwnProps extends TimeMachineQueryProps { onSubmit: (script: string) => void onShowEditor: () => void - isRunnable: boolean + script: string } type Props = OwnProps & typeof mdtp & ReturnType @@ -48,6 +47,7 @@ const FluxQueryBuilder = ({ onSubmit, onShowEditor, onAddTagSelector, + script: editorScript, }: Props) => { const [defaultPeriod, timeRangeText] = useMemo( () => [ @@ -97,7 +97,7 @@ const FluxQueryBuilder = ({