From 6e99afe5a4a5e7045ae63819c9e0c2a1dcf685f9 Mon Sep 17 00:00:00 2001 From: Christopher Henn Date: Fri, 7 Sep 2018 15:12:36 -0700 Subject: [PATCH] Fix issue with hidden SourceSelector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the SourceSelector would hide itself unless Chronograf was connected to more than one source. This prevented a Chronograf instance from selecting a dynamic source or creating flux queries when only connected to one source. In addition to fixing this issue, this commit removes the “Source:” text from the TimeMachine controls, per the design spec. --- ui/src/dashboards/components/SourceSelector.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/dashboards/components/SourceSelector.tsx b/ui/src/dashboards/components/SourceSelector.tsx index 67dea7c5d..ae01d1a5a 100644 --- a/ui/src/dashboards/components/SourceSelector.tsx +++ b/ui/src/dashboards/components/SourceSelector.tsx @@ -30,9 +30,12 @@ const SourceSelector: SFC = ({ isDynamicSourceSelected, onSelectDynamicSource, }) => { - return sources.length > 1 && queries.length ? ( + if (!sources.length || !queries.length) { + return
+ } + + return (
-

Source:

= ({ onSelectDynamicSource={onSelectDynamicSource} />
- ) : ( -
) }