Skip to content

Commit ccdf793

Browse files
committed
remove finish checkbox from create cluster
1 parent 4971f67 commit ccdf793

File tree

4 files changed

+9
-46
lines changed

4 files changed

+9
-46
lines changed

www/src/components/create-cluster/CreateClusterActions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export function CreateClusterActions() {
2626
setCurStep,
2727
cloudOption,
2828
hostingOption,
29-
finishEnabled,
3029
continueBtn,
3130
consoleInstanceId,
31+
isCreatingInstance,
3232
} = useCreateClusterContext()
3333

3434
const { isPaidPlan, isTrialPlan, isTrialExpired, isEnterprisePlan } =
@@ -103,7 +103,7 @@ export function CreateClusterActions() {
103103
)
104104
) : (
105105
<Button
106-
disabled={!finishEnabled}
106+
disabled={isCreatingInstance}
107107
onClick={handleFinish}
108108
>
109109
Finish

www/src/components/create-cluster/CreateClusterWizard.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import React, { ReactElement, createContext, useContext } from 'react'
1212
import { ConsoleInstanceType } from 'generated/graphql'
1313

1414
import { AuthenticationStep } from './steps/AuthenticationStep'
15+
import { ChooseCloudStep } from './steps/ChooseCloudStep'
16+
import { ChooseHostingOptionStep } from './steps/ChooseHostingOptionStep'
1517
import { ConfigureCloudInstanceStep } from './steps/ConfigureCloudInstanceStep'
1618
import { DeployLocallyStep } from './steps/DeployLocallyStep'
17-
import { ChooseCloudStep } from './steps/ChooseCloudStep'
1819
import { InstallCliStep } from './steps/InstallCliStep'
19-
import { ChooseHostingOptionStep } from './steps/ChooseHostingOptionStep'
2020

2121
export enum CreateClusterStepKey {
2222
ChooseCloud = 'choose-cloud',
@@ -42,8 +42,6 @@ export type CreateClusterContextType = {
4242
setHostingOption: (option: ConsoleInstanceType) => void
4343
curStep: CreateClusterStepKey
4444
setCurStep: (step: CreateClusterStepKey) => void
45-
finishEnabled: boolean
46-
setFinishEnabled: (enabled: boolean) => void
4745
continueBtn?: ReactElement
4846
setContinueBtn: (continueBtn?: ReactElement) => void
4947
consoleInstanceId: Nullable<string>

www/src/components/create-cluster/steps/AuthenticationStep.tsx

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@ import {
22
ArrowTopRightIcon,
33
Button,
44
Callout,
5-
Checkbox,
65
Codeline,
76
Flex,
87
WrapWithIf,
98
} from '@pluralsh/design-system'
10-
import styled, { CSSProp, useTheme } from 'styled-components'
9+
import styled, { useTheme } from 'styled-components'
1110

12-
import { useCreateClusterContext } from '../CreateClusterWizard'
1311
import { sanitizeConsoleUrl } from 'components/overview/clusters/all/AllClustersTableCols'
12+
import { useCreateClusterContext } from '../CreateClusterWizard'
1413

1514
export function AuthenticationStep() {
1615
const theme = useTheme()
17-
const { consoleUrl, isCreatingInstance, finishEnabled, setFinishEnabled } =
18-
useCreateClusterContext()
16+
const { consoleUrl, isCreatingInstance } = useCreateClusterContext()
1917

2018
return (
2119
<div css={{ position: 'relative' }}>
@@ -71,21 +69,6 @@ export function AuthenticationStep() {
7169
<Codeline css={{ background: theme.colors['fill-two'] }}>
7270
plural up --cloud
7371
</Codeline>
74-
<Checkbox
75-
small
76-
checked={finishEnabled}
77-
onChange={(e) => setFinishEnabled(e.target.checked)}
78-
css={
79-
{
80-
'& .label': {
81-
userSelect: 'none',
82-
},
83-
} as CSSProp
84-
}
85-
>
86-
I successfully authenticated my cloud instance locally.
87-
<span css={{ color: theme.colors['text-danger'] }}>*</span>
88-
</Checkbox>
8972
</Flex>
9073
</WrapWithIf>
9174
</div>

www/src/components/create-cluster/steps/DeployLocallyStep.tsx

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import { Callout, Checkbox, Codeline, Flex } from '@pluralsh/design-system'
2-
import { CSSProp, useTheme } from 'styled-components'
3-
4-
import { useCreateClusterContext } from '../CreateClusterWizard'
1+
import { Callout, Codeline, Flex } from '@pluralsh/design-system'
2+
import { useTheme } from 'styled-components'
53

64
export function DeployLocallyStep() {
75
const theme = useTheme()
8-
const { finishEnabled, setFinishEnabled } = useCreateClusterContext()
96

107
return (
118
<Flex
@@ -41,21 +38,6 @@ export function DeployLocallyStep() {
4138
</a>
4239
</span>
4340
</Flex>
44-
<Checkbox
45-
small
46-
checked={finishEnabled}
47-
onChange={(e) => setFinishEnabled(e.target.checked)}
48-
css={
49-
{
50-
'& .label': {
51-
userSelect: 'none',
52-
},
53-
} as CSSProp
54-
}
55-
>
56-
The `plural up` command has finished running.
57-
<span css={{ color: theme.colors['text-danger'] }}>*</span>
58-
</Checkbox>
5941
</Flex>
6042
)
6143
}

0 commit comments

Comments
 (0)