diff --git a/ui/src/dashboards/components/SourceSelector.tsx b/ui/src/dashboards/components/SourceSelector.tsx index 38241da94..b0f031942 100644 --- a/ui/src/dashboards/components/SourceSelector.tsx +++ b/ui/src/dashboards/components/SourceSelector.tsx @@ -1,9 +1,10 @@ // Libraries import React, {SFC} from 'react' -// Componentes +// Components import SourceDropdown from 'src/flux/components/SourceDropdown' import {Radio} from 'src/reusable_ui' +import QuestionMarkTooltip from 'src/shared/components/QuestionMarkTooltip' // Types import * as QueriesModels from 'src/types/queries' @@ -55,28 +56,36 @@ const SourceSelector: SFC = ({ onChangeService={onChangeService} onSelectDynamicSource={onSelectDynamicSource} /> + {isDynamicSourceSelected && ( + + + Flux + + + InfluxQL + + + )} {isDynamicSourceSelected && - sourceSupportsFlux && ( - - - Flux - - - InfluxQL - - + !sourceSupportsFlux && ( + The current source does not support Flux.

`} + /> )} ) diff --git a/ui/src/shared/components/TimeMachine/TimeMachine.tsx b/ui/src/shared/components/TimeMachine/TimeMachine.tsx index 79ce0521a..079366874 100644 --- a/ui/src/shared/components/TimeMachine/TimeMachine.tsx +++ b/ui/src/shared/components/TimeMachine/TimeMachine.tsx @@ -405,16 +405,15 @@ class TimeMachine extends PureComponent { private get source(): Source { const {source, sources, queryDrafts} = this.props const {selectedSource, useDynamicSource} = this.state - - if (selectedSource) { - return selectedSource - } - // return current source if (useDynamicSource) { return source } + if (selectedSource) { + return selectedSource + } + const queryDraft = _.get(queryDrafts, 0) const querySource = _.get(queryDraft, 'source')