@@ -32,10 +32,10 @@ export function ConfigureCloudInstanceStep() {
32
32
const { setCurStep, setContinueBtn, setConsoleInstanceId, hostingOption } =
33
33
useCreateClusterContext ( )
34
34
35
- const cloud = CloudProvider . Aws
36
35
const [ name , setName ] = useState ( '' )
37
36
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 ] )
39
39
const [ confirm , setConfirm ] = useState ( false )
40
40
41
41
const [ showNameError , setShowNameError ] = useState ( false )
@@ -131,6 +131,19 @@ export function ConfigureCloudInstanceStep() {
131
131
) ) }
132
132
</ Select >
133
133
</ 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>
134
147
{cloud === CloudProvider.Aws && (
135
148
<FormFieldSC label="Region">
136
149
<Select
@@ -145,7 +158,7 @@ export function ConfigureCloudInstanceStep() {
145
158
))}
146
159
</Select>
147
160
</FormFieldSC>
148
- ) }
161
+ )} */ }
149
162
</ Flex >
150
163
< Confirm
151
164
open = { confirm }
@@ -171,7 +184,7 @@ const ValidationHintSC = styled.span(({ theme }) => ({
171
184
172
185
const validateName = ( name : string ) => {
173
186
const nameValidity = {
174
- length : name . length >= 4 && name . length <= 11 ,
187
+ length : name . length >= 5 && name . length <= 15 ,
175
188
lowercase : ! / [ A - Z ] / . test ( name ) ,
176
189
alphanumeric : ! ! name . match ( / ^ [ a - z 0 - 9 ] + $ / ) ,
177
190
startsWithLetter : ! ! name . at ( 0 ) ?. match ( / [ a - z ] / ) ,
@@ -185,7 +198,7 @@ const validateName = (name: string) => {
185
198
: ! nameValidity . alphanumeric
186
199
? 'Name must be alphanumeric'
187
200
: ! nameValidity . length
188
- ? 'Name must be between 4 and 11 characters'
201
+ ? 'Name must be between 5 and 15 characters'
189
202
: '' ,
190
203
}
191
204
}
0 commit comments