From 1cd20b7b34baec5243d6d4795e82ceb1a04d2dfd Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 4 Oct 2017 17:41:25 -0700 Subject: [PATCH] Prevent CEO toggle from de-centering when no queries present --- ui/src/dashboards/components/OverlayControls.js | 13 ++++++------- ui/src/dashboards/components/SourceSelector.js | 9 +++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ui/src/dashboards/components/OverlayControls.js b/ui/src/dashboards/components/OverlayControls.js index 91c8225985..93a49b4e93 100644 --- a/ui/src/dashboards/components/OverlayControls.js +++ b/ui/src/dashboards/components/OverlayControls.js @@ -16,13 +16,12 @@ const OverlayControls = ({ onClickDisplayOptions, }) =>
- {queries.length - ? - : null} +
  • - sources.length > 1 +const SourceSelector = ({sources = [], selected, onSetQuerySource, queries}) => + sources.length > 1 && queries.length ?

    Source:

    className="dropdown-240" />
    - : null + :
    -const {arrayOf, func, shape, string} = PropTypes +const {array, arrayOf, func, shape, string} = PropTypes SourceSelector.propTypes = { sources: arrayOf(shape()).isRequired, onSetQuerySource: func.isRequired, selected: string, + queries: array, } export default SourceSelector