Merge pull request #1708 from influxdata/dataloader/skip-data-sources-steps
Dataloader/skip data sources stepspull/10616/head
commit
d607afe2a1
|
@ -53,6 +53,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
.wizard-button-container {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.button {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.splash-logo {
|
||||
background-size: 100% 100%;
|
||||
background-position: center center;
|
||||
|
|
|
@ -65,26 +65,48 @@ class ConfigureDataSourceStep extends PureComponent<Props> {
|
|||
dataLoaderType={type}
|
||||
currentIndex={+substepID}
|
||||
/>
|
||||
<div className="wizard-button-bar">
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Back"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handlePrevious}
|
||||
/>
|
||||
<Button
|
||||
color={ComponentColor.Primary}
|
||||
text="Next"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handleNext}
|
||||
status={ComponentStatus.Default}
|
||||
titleText={'Next'}
|
||||
/>
|
||||
<div className="wizard-button-container">
|
||||
<div className="wizard-button-bar">
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Back"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handlePrevious}
|
||||
/>
|
||||
<Button
|
||||
color={ComponentColor.Primary}
|
||||
text="Next"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handleNext}
|
||||
status={ComponentStatus.Default}
|
||||
titleText={'Next'}
|
||||
/>
|
||||
</div>
|
||||
{this.skipLink}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
private get skipLink() {
|
||||
return (
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Skip"
|
||||
size={ComponentSize.Small}
|
||||
onClick={this.jumpToCompletionStep}
|
||||
>
|
||||
skip
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
private jumpToCompletionStep = () => {
|
||||
const {onSetCurrentStepIndex, stepStatuses} = this.props
|
||||
|
||||
onSetCurrentStepIndex(stepStatuses.length - 1)
|
||||
}
|
||||
|
||||
private handleNext = () => {
|
||||
const {
|
||||
onIncrementCurrentStepIndex,
|
||||
|
|
|
@ -60,21 +60,24 @@ class SelectDataSourceStep extends PureComponent<Props, State> {
|
|||
You will be able to configure additional Data Sources later
|
||||
</h5>
|
||||
{this.selector}
|
||||
<div className="wizard-button-bar">
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Back"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handleClickBack}
|
||||
/>
|
||||
<Button
|
||||
color={ComponentColor.Primary}
|
||||
text="Next"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handleClickNext}
|
||||
status={ComponentStatus.Default}
|
||||
titleText={'Next'}
|
||||
/>
|
||||
<div className="wizard-button-container">
|
||||
<div className="wizard-button-bar">
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Back"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handleClickBack}
|
||||
/>
|
||||
<Button
|
||||
color={ComponentColor.Primary}
|
||||
text="Next"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={this.handleClickNext}
|
||||
status={ComponentStatus.Default}
|
||||
titleText={'Next'}
|
||||
/>
|
||||
</div>
|
||||
{this.skipLink}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -106,6 +109,25 @@ class SelectDataSourceStep extends PureComponent<Props, State> {
|
|||
)
|
||||
}
|
||||
|
||||
private get skipLink() {
|
||||
return (
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Skip"
|
||||
size={ComponentSize.Small}
|
||||
onClick={this.jumpToCompletionStep}
|
||||
>
|
||||
skip
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
private jumpToCompletionStep = () => {
|
||||
const {onSetCurrentStepIndex, stepStatuses} = this.props
|
||||
|
||||
onSetCurrentStepIndex(stepStatuses.length - 1)
|
||||
}
|
||||
|
||||
private handleClickNext = () => {
|
||||
const {
|
||||
router,
|
||||
|
|
|
@ -32,7 +32,7 @@ describe('Onboarding.Components.VerifyStep.VerifyDataStep', () => {
|
|||
const switcher = wrapper.find(VerifyDataSwitcher)
|
||||
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
expect(buttons.length).toBe(2)
|
||||
expect(buttons.length).toBe(3)
|
||||
expect(switcher.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -38,25 +38,47 @@ class VerifyDataStep extends PureComponent<Props> {
|
|||
username={_.get(setupParams, 'username', '')}
|
||||
bucket={_.get(setupParams, 'bucket', '')}
|
||||
/>
|
||||
<div className="wizard-button-bar">
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Back"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={onDecrementCurrentStepIndex}
|
||||
/>
|
||||
<Button
|
||||
color={ComponentColor.Primary}
|
||||
text="Next"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={onIncrementCurrentStepIndex}
|
||||
status={ComponentStatus.Default}
|
||||
titleText={'Next'}
|
||||
/>
|
||||
<div className="wizard-button-container">
|
||||
<div className="wizard-button-bar">
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Back"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={onDecrementCurrentStepIndex}
|
||||
/>
|
||||
<Button
|
||||
color={ComponentColor.Primary}
|
||||
text="Next"
|
||||
size={ComponentSize.Medium}
|
||||
onClick={onIncrementCurrentStepIndex}
|
||||
status={ComponentStatus.Default}
|
||||
titleText={'Next'}
|
||||
/>
|
||||
</div>
|
||||
{this.skipLink}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
private get skipLink() {
|
||||
return (
|
||||
<Button
|
||||
color={ComponentColor.Default}
|
||||
text="Skip"
|
||||
size={ComponentSize.Small}
|
||||
onClick={this.jumpToCompletionStep}
|
||||
>
|
||||
skip
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
private jumpToCompletionStep = () => {
|
||||
const {onSetCurrentStepIndex, stepStatuses} = this.props
|
||||
|
||||
onSetCurrentStepIndex(stepStatuses.length - 1)
|
||||
}
|
||||
}
|
||||
|
||||
export default VerifyDataStep
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Libraries
|
||||
import React, {PureComponent} from 'react'
|
||||
import {withRouter, WithRouterProps} from 'react-router'
|
||||
|
||||
import {connect} from 'react-redux'
|
||||
import _ from 'lodash'
|
||||
|
||||
|
@ -29,7 +28,6 @@ import {
|
|||
import {StepStatus} from 'src/clockface/constants/wizard'
|
||||
|
||||
// Types
|
||||
|
||||
import {Links} from 'src/types/v2/links'
|
||||
import {SetupParams} from 'src/onboarding/apis'
|
||||
import {TelegrafPlugin, DataLoaderType} from 'src/types/v2/dataLoaders'
|
||||
|
|
Loading…
Reference in New Issue