From d61152a1de48db8e33309b6763f60988efdba89d Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Mon, 20 Aug 2018 11:14:39 -0700 Subject: [PATCH 1/5] Add dynamic source option to ceo source dropdown --- .../dashboards/components/SourceSelector.tsx | 4 ++ ui/src/flux/components/FluxHeader.tsx | 1 + ui/src/flux/components/SourceDropdown.tsx | 53 ++++++++++++++++--- .../components/TimeMachine/TimeMachine.tsx | 33 +++++++++--- .../TimeMachine/TimeMachineControls.tsx | 3 ++ ui/src/sources/constants/index.ts | 5 ++ 6 files changed, 85 insertions(+), 14 deletions(-) diff --git a/ui/src/dashboards/components/SourceSelector.tsx b/ui/src/dashboards/components/SourceSelector.tsx index 2ab5cffe6..b61bf6ca7 100644 --- a/ui/src/dashboards/components/SourceSelector.tsx +++ b/ui/src/dashboards/components/SourceSelector.tsx @@ -12,6 +12,7 @@ interface Props { service: Service services: Service[] queries: QueriesModels.QueryConfig[] + isDynamicSourceSelected: boolean onChangeService: (service: Service, source: SourcesModels.Source) => void } @@ -22,6 +23,7 @@ const SourceSelector: SFC = ({ services, queries, onChangeService, + isDynamicSourceSelected, }) => { return sources.length > 1 && queries.length ? (
@@ -32,6 +34,8 @@ const SourceSelector: SFC = ({ source={source} sources={sources} allowInfluxQL={true} + allowDynamicSource={true} + isDynamicSourceSelected={isDynamicSourceSelected} onChangeService={onChangeService} />
diff --git a/ui/src/flux/components/FluxHeader.tsx b/ui/src/flux/components/FluxHeader.tsx index 131882ff9..f265f5882 100644 --- a/ui/src/flux/components/FluxHeader.tsx +++ b/ui/src/flux/components/FluxHeader.tsx @@ -41,6 +41,7 @@ class FluxHeader extends PureComponent { services={services} service={service} allowInfluxQL={false} + allowDynamicSource={false} onChangeService={onChangeService} />