diff --git a/ui/src/onboarding/components/OnboardingSideBar.tsx b/ui/src/onboarding/components/OnboardingSideBar.tsx index d2cfbb9d48..0cec946558 100644 --- a/ui/src/onboarding/components/OnboardingSideBar.tsx +++ b/ui/src/onboarding/components/OnboardingSideBar.tsx @@ -27,7 +27,7 @@ interface Props { notify: NotificationAction onTabClick: (tabID: string) => void currentStepIndex: number - handleNewSourceClick: () => void + onNewSourceClick: () => void } const configStateToTabStatus = (cs: ConfigurationState): TabStatus => { @@ -71,7 +71,7 @@ class OnboardingSideBar extends Component { } private get buttons(): JSX.Element[] { - const {handleNewSourceClick} = this.props + const {onNewSourceClick} = this.props return [ { titleText="Add New Source" color={ComponentColor.Default} icon={IconFont.Plus} - onClick={handleNewSourceClick} + onClick={onNewSourceClick} />, ] } diff --git a/ui/src/onboarding/containers/OnboardingWizard.tsx b/ui/src/onboarding/containers/OnboardingWizard.tsx index e714890e3d..090fa8778c 100644 --- a/ui/src/onboarding/containers/OnboardingWizard.tsx +++ b/ui/src/onboarding/containers/OnboardingWizard.tsx @@ -63,7 +63,10 @@ interface OwnProps { onIncrementCurrentStepIndex: () => void onDecrementCurrentStepIndex: () => void onSetCurrentStepIndex: (stepNumber: number) => void - onSetCurrentSubStepIndex: (stepNumber: number, substepNumber: number) => void + onSetCurrentSubStepIndex: ( + stepNumber: number, + substep: number | 'streaming' + ) => void } interface DispatchProps { @@ -121,7 +124,6 @@ class OnboardingWizard extends PureComponent { onRemovePluginBundle, setupParams, notify, - onDecrementCurrentStepIndex, } = this.props return ( @@ -136,7 +138,7 @@ class OnboardingWizard extends PureComponent { title="Plugins to Configure" visible={this.sideBarVisible} currentStepIndex={currentStepIndex} - handleNewSourceClick={onDecrementCurrentStepIndex} + onNewSourceClick={this.handleNewSourceClick} />
{ return isStreaming && isSideBarStep } + private handleNewSourceClick = () => { + const {onSetCurrentSubStepIndex} = this.props + onSetCurrentSubStepIndex(2, 'streaming') + } + private handleClickSideBarTab = (telegrafPluginID: string) => { const { onSetCurrentSubStepIndex, diff --git a/ui/src/onboarding/containers/OnboardingWizardPage.tsx b/ui/src/onboarding/containers/OnboardingWizardPage.tsx index fe2144f0d9..c8d16cdbfa 100644 --- a/ui/src/onboarding/containers/OnboardingWizardPage.tsx +++ b/ui/src/onboarding/containers/OnboardingWizardPage.tsx @@ -93,10 +93,10 @@ export class OnboardingWizardPage extends PureComponent { router.push(`/onboarding/${index}`) } - private setSubstepIndex = (index: number, subIndex: number) => { + private setSubstepIndex = (index: number, subStep: number | 'streaming') => { const {router} = this.props - router.push(`/onboarding/${index}/${subIndex}`) + router.push(`/onboarding/${index}/${subStep}`) } }