diff --git a/ui/mocks/dummyData.ts b/ui/mocks/dummyData.ts index 7e6cff0742..7b26eb0458 100644 --- a/ui/mocks/dummyData.ts +++ b/ui/mocks/dummyData.ts @@ -10,7 +10,7 @@ import { } from 'src/types' import {Links} from 'src/types/v2/links' import {Task, TaskStatus} from 'src/types/v2/tasks' -import {DataSource, ConfigurationState} from 'src/types/v2/dataSources' +import {DataSource, ConfigurationState} from 'src/types/v2/dataLoaders' export const links: Links = { authorizations: '/api/v2/authorizations', diff --git a/ui/src/onboarding/actions/dataLoaders.ts b/ui/src/onboarding/actions/dataLoaders.ts index f506592a8d..2c31440d02 100644 --- a/ui/src/onboarding/actions/dataLoaders.ts +++ b/ui/src/onboarding/actions/dataLoaders.ts @@ -1,5 +1,5 @@ // Types -import {DataSource, DataLoaderType} from 'src/types/v2/dataSources' +import {DataSource, DataLoaderType} from 'src/types/v2/dataLoaders' export type Action = | SetDataLoadersType diff --git a/ui/src/onboarding/components/OnboardingSideBar.tsx b/ui/src/onboarding/components/OnboardingSideBar.tsx index 1d8e975b12..837ffee437 100644 --- a/ui/src/onboarding/components/OnboardingSideBar.tsx +++ b/ui/src/onboarding/components/OnboardingSideBar.tsx @@ -16,7 +16,7 @@ import {getTelegrafConfigTOML, createTelegrafConfig} from 'src/onboarding/apis' // Types import {IconFont} from 'src/clockface' -import {DataSource, ConfigurationState} from 'src/types/v2/dataSources' +import {DataSource, ConfigurationState} from 'src/types/v2/dataLoaders' import {NotificationAction} from 'src/types' interface Props { diff --git a/ui/src/onboarding/components/OnboardingStepSwitcher.tsx b/ui/src/onboarding/components/OnboardingStepSwitcher.tsx index 4c252a2405..c01026b7f1 100644 --- a/ui/src/onboarding/components/OnboardingStepSwitcher.tsx +++ b/ui/src/onboarding/components/OnboardingStepSwitcher.tsx @@ -5,8 +5,8 @@ import _ from 'lodash' // Components import InitStep from 'src/onboarding/components/InitStep' import AdminStep from 'src/onboarding/components/AdminStep' -import SelectDataSourceStep from 'src/onboarding/components/SelectDataSourceStep' -import ConfigureDataSourceStep from 'src/onboarding/components/ConfigureDataSourceStep' +import SelectDataSourceStep from 'src/onboarding/components/selectionStep/SelectDataSourceStep' +import ConfigureDataSourceStep from 'src/onboarding/components/configureStep/ConfigureDataSourceStep' import CompletionStep from 'src/onboarding/components/CompletionStep' import {ErrorHandling} from 'src/shared/decorators/errors' @@ -19,7 +19,7 @@ import { // Types import {SetupParams} from 'src/onboarding/apis' -import {DataSource, DataLoaderType} from 'src/types/v2/dataSources' +import {DataSource, DataLoaderType} from 'src/types/v2/dataLoaders' import {OnboardingStepProps} from 'src/onboarding/containers/OnboardingWizard' interface Props { diff --git a/ui/src/onboarding/components/ConfigureDataSourceStep.tsx b/ui/src/onboarding/components/configureStep/ConfigureDataSourceStep.tsx similarity index 95% rename from ui/src/onboarding/components/ConfigureDataSourceStep.tsx rename to ui/src/onboarding/components/configureStep/ConfigureDataSourceStep.tsx index e053bc1f40..9f8db6ca87 100644 --- a/ui/src/onboarding/components/ConfigureDataSourceStep.tsx +++ b/ui/src/onboarding/components/configureStep/ConfigureDataSourceStep.tsx @@ -10,11 +10,11 @@ import { ComponentSize, ComponentStatus, } from 'src/clockface' -import ConfigureDataSourceSwitcher from 'src/onboarding/components/ConfigureDataSourceSwitcher' +import ConfigureDataSourceSwitcher from 'src/onboarding/components/configureStep/ConfigureDataSourceSwitcher' // Types import {OnboardingStepProps} from 'src/onboarding/containers/OnboardingWizard' -import {DataSource, DataLoaderType} from 'src/types/v2/dataSources' +import {DataSource, DataLoaderType} from 'src/types/v2/dataLoaders' export interface Props extends OnboardingStepProps { dataSources: DataSource[] diff --git a/ui/src/onboarding/components/ConfigureDataSourceSwitcher.tsx b/ui/src/onboarding/components/configureStep/ConfigureDataSourceSwitcher.tsx similarity index 86% rename from ui/src/onboarding/components/ConfigureDataSourceSwitcher.tsx rename to ui/src/onboarding/components/configureStep/ConfigureDataSourceSwitcher.tsx index 2e44c2bec7..7e6b6c84f6 100644 --- a/ui/src/onboarding/components/ConfigureDataSourceSwitcher.tsx +++ b/ui/src/onboarding/components/configureStep/ConfigureDataSourceSwitcher.tsx @@ -3,10 +3,10 @@ import React, {PureComponent} from 'react' // Components import {ErrorHandling} from 'src/shared/decorators/errors' -import DataStreaming from 'src/onboarding/components/DataStreaming' +import DataStreaming from 'src/onboarding/components/configureStep/streaming/DataStreaming' // Types -import {DataSource} from 'src/types/v2/dataSources' +import {DataSource} from 'src/types/v2/dataLoaders' export interface Props { dataSources: DataSource[] diff --git a/ui/src/onboarding/components/ConnectionInformation.test.tsx b/ui/src/onboarding/components/configureStep/streaming/ConnectionInformation.test.tsx similarity index 90% rename from ui/src/onboarding/components/ConnectionInformation.test.tsx rename to ui/src/onboarding/components/configureStep/streaming/ConnectionInformation.test.tsx index d8c89fb819..fb451b9bd4 100644 --- a/ui/src/onboarding/components/ConnectionInformation.test.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/ConnectionInformation.test.tsx @@ -3,7 +3,7 @@ import React from 'react' import {shallow} from 'enzyme' // Components -import ConnectionInformation from 'src/onboarding/components/ConnectionInformation' +import ConnectionInformation from 'src/onboarding/components/configureStep/streaming/ConnectionInformation' // Types import {RemoteDataState} from 'src/types' diff --git a/ui/src/onboarding/components/ConnectionInformation.tsx b/ui/src/onboarding/components/configureStep/streaming/ConnectionInformation.tsx similarity index 100% rename from ui/src/onboarding/components/ConnectionInformation.tsx rename to ui/src/onboarding/components/configureStep/streaming/ConnectionInformation.tsx diff --git a/ui/src/onboarding/components/DataListening.test.tsx b/ui/src/onboarding/components/configureStep/streaming/DataListening.test.tsx similarity index 81% rename from ui/src/onboarding/components/DataListening.test.tsx rename to ui/src/onboarding/components/configureStep/streaming/DataListening.test.tsx index e6aaeb9300..a45d787f2a 100644 --- a/ui/src/onboarding/components/DataListening.test.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/DataListening.test.tsx @@ -3,8 +3,8 @@ import React from 'react' import {shallow} from 'enzyme' // Components -import DataListening from 'src/onboarding/components/DataListening' -import ConnectionInformation from 'src/onboarding/components/ConnectionInformation' +import DataListening from 'src/onboarding/components/configureStep/streaming/DataListening' +import ConnectionInformation from 'src/onboarding/components/configureStep/streaming/ConnectionInformation' import {Button} from 'src/clockface' const setup = (override = {}) => { diff --git a/ui/src/onboarding/components/DataListening.tsx b/ui/src/onboarding/components/configureStep/streaming/DataListening.tsx similarity index 96% rename from ui/src/onboarding/components/DataListening.tsx rename to ui/src/onboarding/components/configureStep/streaming/DataListening.tsx index c54c17db35..44c4decb79 100644 --- a/ui/src/onboarding/components/DataListening.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/DataListening.tsx @@ -13,7 +13,7 @@ import { ComponentSize, ComponentStatus, } from 'src/clockface' -import ConnectionInformation from 'src/onboarding/components/ConnectionInformation' +import ConnectionInformation from 'src/onboarding/components/configureStep/streaming/ConnectionInformation' // types import {RemoteDataState} from 'src/types' diff --git a/ui/src/onboarding/components/DataStreaming.tsx b/ui/src/onboarding/components/configureStep/streaming/DataStreaming.tsx similarity index 70% rename from ui/src/onboarding/components/DataStreaming.tsx rename to ui/src/onboarding/components/configureStep/streaming/DataStreaming.tsx index a8570fa5fd..1676fd170a 100644 --- a/ui/src/onboarding/components/DataStreaming.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/DataStreaming.tsx @@ -3,10 +3,10 @@ import React, {PureComponent} from 'react' import _ from 'lodash' // Components -import TelegrafInstructions from 'src/onboarding/components/TelegrafInstructions' -import FetchConfigID from 'src/onboarding/components/FetchConfigID' -import FetchAuthToken from 'src/onboarding/components/FetchAuthToken' -import DataListening from 'src/onboarding/components/DataListening' +import TelegrafInstructions from 'src/onboarding/components/configureStep/streaming/TelegrafInstructions' +import FetchConfigID from 'src/onboarding/components/configureStep/streaming/FetchConfigID' +import FetchAuthToken from 'src/onboarding/components/configureStep/streaming/FetchAuthToken' +import DataListening from 'src/onboarding/components/configureStep/streaming/DataListening' // Decorator import {ErrorHandling} from 'src/shared/decorators/errors' diff --git a/ui/src/onboarding/components/FetchAuthToken.test.tsx b/ui/src/onboarding/components/configureStep/streaming/FetchAuthToken.test.tsx similarity index 85% rename from ui/src/onboarding/components/FetchAuthToken.test.tsx rename to ui/src/onboarding/components/configureStep/streaming/FetchAuthToken.test.tsx index 24c8fb7401..3779265ab6 100644 --- a/ui/src/onboarding/components/FetchAuthToken.test.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/FetchAuthToken.test.tsx @@ -3,7 +3,7 @@ import React from 'react' import {shallow} from 'enzyme' // Components -import FetchAuthToken from 'src/onboarding/components/FetchAuthToken' +import FetchAuthToken from 'src/onboarding/components/configureStep/streaming/FetchAuthToken' jest.mock('src/utils/api', () => require('src/onboarding/apis/mocks')) diff --git a/ui/src/onboarding/components/FetchAuthToken.tsx b/ui/src/onboarding/components/configureStep/streaming/FetchAuthToken.tsx similarity index 100% rename from ui/src/onboarding/components/FetchAuthToken.tsx rename to ui/src/onboarding/components/configureStep/streaming/FetchAuthToken.tsx diff --git a/ui/src/onboarding/components/FetchConfigID.test.tsx b/ui/src/onboarding/components/configureStep/streaming/FetchConfigID.test.tsx similarity index 84% rename from ui/src/onboarding/components/FetchConfigID.test.tsx rename to ui/src/onboarding/components/configureStep/streaming/FetchConfigID.test.tsx index 3820dc6718..20cabfcb38 100644 --- a/ui/src/onboarding/components/FetchConfigID.test.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/FetchConfigID.test.tsx @@ -3,7 +3,7 @@ import React from 'react' import {shallow} from 'enzyme' // Components -import FetchConfigID from 'src/onboarding/components/FetchConfigID' +import FetchConfigID from 'src/onboarding/components/configureStep/streaming/FetchConfigID' jest.mock('src/utils/api', () => require('src/onboarding/apis/mocks')) diff --git a/ui/src/onboarding/components/FetchConfigID.tsx b/ui/src/onboarding/components/configureStep/streaming/FetchConfigID.tsx similarity index 100% rename from ui/src/onboarding/components/FetchConfigID.tsx rename to ui/src/onboarding/components/configureStep/streaming/FetchConfigID.tsx diff --git a/ui/src/onboarding/components/TelegrafInstructions.test.tsx b/ui/src/onboarding/components/configureStep/streaming/TelegrafInstructions.test.tsx similarity index 82% rename from ui/src/onboarding/components/TelegrafInstructions.test.tsx rename to ui/src/onboarding/components/configureStep/streaming/TelegrafInstructions.test.tsx index c359a28d08..f7cd7a4515 100644 --- a/ui/src/onboarding/components/TelegrafInstructions.test.tsx +++ b/ui/src/onboarding/components/configureStep/streaming/TelegrafInstructions.test.tsx @@ -1,7 +1,7 @@ import React from 'react' import {shallow} from 'enzyme' -import TelegrafInstructions from 'src/onboarding/components/TelegrafInstructions' +import TelegrafInstructions from 'src/onboarding/components/configureStep/streaming/TelegrafInstructions' let wrapper diff --git a/ui/src/onboarding/components/TelegrafInstructions.tsx b/ui/src/onboarding/components/configureStep/streaming/TelegrafInstructions.tsx similarity index 100% rename from ui/src/onboarding/components/TelegrafInstructions.tsx rename to ui/src/onboarding/components/configureStep/streaming/TelegrafInstructions.tsx diff --git a/ui/src/onboarding/components/__snapshots__/ConnectionInformation.test.tsx.snap b/ui/src/onboarding/components/configureStep/streaming/__snapshots__/ConnectionInformation.test.tsx.snap similarity index 100% rename from ui/src/onboarding/components/__snapshots__/ConnectionInformation.test.tsx.snap rename to ui/src/onboarding/components/configureStep/streaming/__snapshots__/ConnectionInformation.test.tsx.snap diff --git a/ui/src/onboarding/components/__snapshots__/TelegrafInstructions.test.tsx.snap b/ui/src/onboarding/components/configureStep/streaming/__snapshots__/TelegrafInstructions.test.tsx.snap similarity index 100% rename from ui/src/onboarding/components/__snapshots__/TelegrafInstructions.test.tsx.snap rename to ui/src/onboarding/components/configureStep/streaming/__snapshots__/TelegrafInstructions.test.tsx.snap diff --git a/ui/src/onboarding/components/SelectDataSourceStep.tsx b/ui/src/onboarding/components/selectionStep/SelectDataSourceStep.tsx similarity index 95% rename from ui/src/onboarding/components/SelectDataSourceStep.tsx rename to ui/src/onboarding/components/selectionStep/SelectDataSourceStep.tsx index 73559b3dea..cdb3511c4f 100644 --- a/ui/src/onboarding/components/SelectDataSourceStep.tsx +++ b/ui/src/onboarding/components/selectionStep/SelectDataSourceStep.tsx @@ -9,8 +9,8 @@ import { ComponentSize, ComponentStatus, } from 'src/clockface' -import DataSourceTypeSelector from 'src/onboarding/components/DataSourceTypeSelector' -import StreamingDataSourceSelector from 'src/onboarding/components/StreamingDataSourcesSelector' +import DataSourceTypeSelector from 'src/onboarding/components/selectionStep/TypeSelector' +import StreamingDataSourceSelector from 'src/onboarding/components/selectionStep/StreamingSelector' // Types import {OnboardingStepProps} from 'src/onboarding/containers/OnboardingWizard' @@ -18,7 +18,7 @@ import { DataSource, DataLoaderType, ConfigurationState, -} from 'src/types/v2/dataSources' +} from 'src/types/v2/dataLoaders' export interface Props extends OnboardingStepProps { bucket: string diff --git a/ui/src/onboarding/components/StreamingDataSourcesSelector.tsx b/ui/src/onboarding/components/selectionStep/StreamingSelector.tsx similarity index 96% rename from ui/src/onboarding/components/StreamingDataSourcesSelector.tsx rename to ui/src/onboarding/components/selectionStep/StreamingSelector.tsx index 33bc51125f..5ec3595fa9 100644 --- a/ui/src/onboarding/components/StreamingDataSourcesSelector.tsx +++ b/ui/src/onboarding/components/selectionStep/StreamingSelector.tsx @@ -7,7 +7,7 @@ import CardSelectCard from 'src/clockface/components/card_select/CardSelectCard' import GridSizer from 'src/clockface/components/grid_sizer/GridSizer' // Types -import {DataSource} from 'src/types/v2/dataSources' +import {DataSource} from 'src/types/v2/dataLoaders' export interface Props { dataSources: DataSource[] diff --git a/ui/src/onboarding/components/DataSourceTypeSelector.tsx b/ui/src/onboarding/components/selectionStep/TypeSelector.tsx similarity index 95% rename from ui/src/onboarding/components/DataSourceTypeSelector.tsx rename to ui/src/onboarding/components/selectionStep/TypeSelector.tsx index cae1d51cbf..33126ffc43 100644 --- a/ui/src/onboarding/components/DataSourceTypeSelector.tsx +++ b/ui/src/onboarding/components/selectionStep/TypeSelector.tsx @@ -7,7 +7,7 @@ import CardSelectCard from 'src/clockface/components/card_select/CardSelectCard' import GridSizer from 'src/clockface/components/grid_sizer/GridSizer' // Types -import {DataLoaderType} from 'src/types/v2/dataSources' +import {DataLoaderType} from 'src/types/v2/dataLoaders' export interface Props { onSelectDataSource: (dataSource: string) => void diff --git a/ui/src/onboarding/containers/OnboardingWizard.tsx b/ui/src/onboarding/containers/OnboardingWizard.tsx index 616608b478..75cbec3798 100644 --- a/ui/src/onboarding/containers/OnboardingWizard.tsx +++ b/ui/src/onboarding/containers/OnboardingWizard.tsx @@ -36,7 +36,7 @@ import {StepStatus} from 'src/clockface/constants/wizard' // Types import {Links} from 'src/types/v2/links' import {SetupParams} from 'src/onboarding/apis' -import {DataSource, DataLoaderType} from 'src/types/v2/dataSources' +import {DataSource, DataLoaderType} from 'src/types/v2/dataLoaders' import {Notification, NotificationFunc} from 'src/types' import {AppState} from 'src/types/v2' import OnboardingSideBar from 'src/onboarding/components/OnboardingSideBar' diff --git a/ui/src/onboarding/reducers/dataLoaders.test.ts b/ui/src/onboarding/reducers/dataLoaders.test.ts index e1feae06ff..0a750bf55e 100644 --- a/ui/src/onboarding/reducers/dataLoaders.test.ts +++ b/ui/src/onboarding/reducers/dataLoaders.test.ts @@ -11,7 +11,7 @@ import { removeDataSource, } from 'src/onboarding/actions/dataLoaders' -import {DataLoaderType, ConfigurationState} from 'src/types/v2/dataSources' +import {DataLoaderType, ConfigurationState} from 'src/types/v2/dataLoaders' describe('dataLoader reducer', () => { describe('if type is streaming', () => { diff --git a/ui/src/onboarding/reducers/dataLoaders.ts b/ui/src/onboarding/reducers/dataLoaders.ts index e8865fa61f..5037bfa159 100644 --- a/ui/src/onboarding/reducers/dataLoaders.ts +++ b/ui/src/onboarding/reducers/dataLoaders.ts @@ -3,7 +3,7 @@ import {getInitialDataSources} from 'src/onboarding/utils/dataLoaders' // Types import {Action} from 'src/onboarding/actions/dataLoaders' -import {DataSource, DataLoaderType} from 'src/types/v2/dataSources' +import {DataSource, DataLoaderType} from 'src/types/v2/dataLoaders' export interface DataLoadersState { dataSources: DataSource[] diff --git a/ui/src/onboarding/utils/dataLoaders.ts b/ui/src/onboarding/utils/dataLoaders.ts index 5eb8b5db4b..51e844ec01 100644 --- a/ui/src/onboarding/utils/dataLoaders.ts +++ b/ui/src/onboarding/utils/dataLoaders.ts @@ -1,5 +1,5 @@ // Types -import {DataLoaderType, ConfigurationState} from 'src/types/v2/dataSources' +import {DataLoaderType, ConfigurationState} from 'src/types/v2/dataLoaders' export const getInitialDataSources = (type: DataLoaderType) => { if (type === DataLoaderType.Streaming) { diff --git a/ui/src/types/v2/dataSources.ts b/ui/src/types/v2/dataLoaders.ts similarity index 100% rename from ui/src/types/v2/dataSources.ts rename to ui/src/types/v2/dataLoaders.ts