Skip to content

Commit 1e208cc

Browse files
committed
cloud create menu updates
1 parent bab15d9 commit 1e208cc

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const SidebarWrapperSC = styled.div(({ theme }) => ({
210210

211211
const ContentWrapperSC = styled.div(({ theme }) => ({
212212
display: 'flex',
213-
margin: 'auto',
213+
height: 'fit-content',
214214
minWidth: 600,
215215
maxWidth: 720,
216216
flexDirection: 'column',

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

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ export function ConfigureCloudInstanceStep() {
3232
const { setCurStep, setContinueBtn, setConsoleInstanceId, hostingOption } =
3333
useCreateClusterContext()
3434

35-
const cloud = CloudProvider.Aws
3635
const [name, setName] = useState('')
3736
const [size, setSize] = useState<ConsoleSize>(ConsoleSize.Small)
38-
const [region, setRegion] = useState<string>(REGIONS[0])
37+
const [cloud, _setCloud] = useState<CloudProvider>(CloudProvider.Aws)
38+
const [region, _setRegion] = useState<string>(REGIONS[0])
3939
const [confirm, setConfirm] = useState(false)
4040

4141
const [showNameError, setShowNameError] = useState(false)
@@ -131,6 +131,19 @@ export function ConfigureCloudInstanceStep() {
131131
))}
132132
</Select>
133133
</FormFieldSC>
134+
{/* <FormFieldSC label="Cloud">
135+
<Select
136+
selectedKey={cloud}
137+
onSelectionChange={(cloud) => setCloud(cloud as CloudProvider)}
138+
>
139+
{Object.values(CloudProvider).map((value) => (
140+
<ListBoxItem
141+
key={value}
142+
label={value}
143+
/>
144+
))}
145+
</Select>
146+
</FormFieldSC>
134147
{cloud === CloudProvider.Aws && (
135148
<FormFieldSC label="Region">
136149
<Select
@@ -145,7 +158,7 @@ export function ConfigureCloudInstanceStep() {
145158
))}
146159
</Select>
147160
</FormFieldSC>
148-
)}
161+
)} */}
149162
</Flex>
150163
<Confirm
151164
open={confirm}
@@ -171,7 +184,7 @@ const ValidationHintSC = styled.span(({ theme }) => ({
171184

172185
const validateName = (name: string) => {
173186
const nameValidity = {
174-
length: name.length >= 4 && name.length <= 11,
187+
length: name.length >= 5 && name.length <= 15,
175188
lowercase: !/[A-Z]/.test(name),
176189
alphanumeric: !!name.match(/^[a-z0-9]+$/),
177190
startsWithLetter: !!name.at(0)?.match(/[a-z]/),
@@ -185,7 +198,7 @@ const validateName = (name: string) => {
185198
: !nameValidity.alphanumeric
186199
? 'Name must be alphanumeric'
187200
: !nameValidity.length
188-
? 'Name must be between 4 and 11 characters'
201+
? 'Name must be between 5 and 15 characters'
189202
: '',
190203
}
191204
}

0 commit comments

Comments
 (0)