@@ -35,7 +35,8 @@ export function ConfigureCloudInstanceStep() {
35
35
const cloud = CloudProvider . Aws
36
36
const [ name , setName ] = useState ( '' )
37
37
const [ size , setSize ] = useState < ConsoleSize > ( ConsoleSize . Small )
38
- const [ region , setRegion ] = useState < string > ( REGIONS [ 0 ] )
38
+ const [ cloud , _setCloud ] = useState < CloudProvider > ( CloudProvider . Aws )
39
+ const [ region , _setRegion ] = useState < string > ( REGIONS [ 0 ] )
39
40
const [ confirm , setConfirm ] = useState ( false )
40
41
41
42
const [ showNameError , setShowNameError ] = useState ( false )
@@ -131,6 +132,19 @@ export function ConfigureCloudInstanceStep() {
131
132
) ) }
132
133
</ Select >
133
134
</ FormFieldSC >
135
+ { /* <FormFieldSC label="Cloud">
136
+ <Select
137
+ selectedKey={cloud}
138
+ onSelectionChange={(cloud) => setCloud(cloud as CloudProvider)}
139
+ >
140
+ {Object.values(CloudProvider).map((value) => (
141
+ <ListBoxItem
142
+ key={value}
143
+ label={value}
144
+ />
145
+ ))}
146
+ </Select>
147
+ </FormFieldSC>
134
148
{cloud === CloudProvider.Aws && (
135
149
<FormFieldSC label="Region">
136
150
<Select
@@ -145,7 +159,7 @@ export function ConfigureCloudInstanceStep() {
145
159
))}
146
160
</Select>
147
161
</FormFieldSC>
148
- ) }
162
+ )} */ }
149
163
</ Flex >
150
164
< Confirm
151
165
open = { confirm }
@@ -171,7 +185,7 @@ const ValidationHintSC = styled.span(({ theme }) => ({
171
185
172
186
const validateName = ( name : string ) => {
173
187
const nameValidity = {
174
- length : name . length >= 4 && name . length <= 11 ,
188
+ length : name . length >= 5 && name . length <= 15 ,
175
189
lowercase : ! / [ A - Z ] / . test ( name ) ,
176
190
alphanumeric : ! ! name . match ( / ^ [ a - z 0 - 9 ] + $ / ) ,
177
191
startsWithLetter : ! ! name . at ( 0 ) ?. match ( / [ a - z ] / ) ,
@@ -185,7 +199,7 @@ const validateName = (name: string) => {
185
199
: ! nameValidity . alphanumeric
186
200
? 'Name must be alphanumeric'
187
201
: ! nameValidity . length
188
- ? 'Name must be between 4 and 11 characters'
202
+ ? 'Name must be between 5 and 15 characters'
189
203
: '' ,
190
204
}
191
205
}
0 commit comments