From f4db32d8a1ef386977e400cb5f647a9f34826e85 Mon Sep 17 00:00:00 2001 From: Pavel Zavora Date: Tue, 24 Nov 2020 19:57:27 +0100 Subject: [PATCH] feat(ui): use organization and token labels during InfluxDB v2 setup --- ui/src/sources/components/SourceStep.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/sources/components/SourceStep.tsx b/ui/src/sources/components/SourceStep.tsx index e70c391f7..e0b46c4bc 100644 --- a/ui/src/sources/components/SourceStep.tsx +++ b/ui/src/sources/components/SourceStep.tsx @@ -36,6 +36,8 @@ import {Source, Me} from 'src/types' import {NextReturn} from 'src/types/wizard' const isNewSource = (source: Partial) => !source.id +const isSourceV2 = (source: Partial) => + !source.version || source.version.startsWith('2.') interface Props { notify: typeof notifyAction @@ -98,6 +100,8 @@ class SourceStep extends PureComponent { public render() { const {source} = this.state const {isUsingAuth, onBoarding} = this.props + const sourceIsV2 = isSourceV2(source) + return ( <> {isUsingAuth && onBoarding && this.authIndicator} @@ -115,12 +119,12 @@ class SourceStep extends PureComponent { />