@@ -6,7 +6,7 @@ import { isNil } from 'lodash';
66import * as yup from 'yup' ;
77import { WizardProps } from '@cloudscape-design/components' ;
88
9- import { Container , FormInput , InfoLink , KeyValuePairs , SpaceBetween , Wizard } from 'components' ;
9+ import { Container , InfoLink , KeyValuePairs , SpaceBetween , Wizard } from 'components' ;
1010
1111import { useBreadcrumbs , useConfirmationDialog , useHelpPanel , useNotifications } from 'hooks' ;
1212import { ROUTES } from 'routes' ;
@@ -23,7 +23,7 @@ import { IFleetWizardForm } from './types';
2323const requiredFieldError = 'This is required field' ;
2424const namesFieldError = 'Only latin characters, dashes, underscores, and digits' ;
2525
26- const fleetStepIndex = 1 ;
26+ const fleetStepIndex = 0 ;
2727
2828const fleetValidationSchema = yup . object ( {
2929 project_name : yup
@@ -101,10 +101,6 @@ export const FleetAdd: React.FC = () => {
101101 } ,
102102 ] ) ;
103103
104- const validateName = async ( ) => {
105- return await trigger ( [ 'project_name' ] ) ;
106- } ;
107-
108104 const validateFleet = async ( ) => {
109105 return await trigger ( [ 'min_instances' , 'max_instances' , 'idle_duration' ] ) ;
110106 } ;
@@ -118,7 +114,7 @@ export const FleetAdd: React.FC = () => {
118114 requestedStepIndex : number ;
119115 reason : WizardProps . NavigationReason ;
120116 } ) => {
121- const stepValidators = [ validateName , validateFleet , emptyValidator ] ;
117+ const stepValidators = [ validateFleet , emptyValidator ] ;
122118
123119 if ( reason === 'next' ) {
124120 stepValidators [ activeStepIndex ] ?.( ) . then ( ( isValid ) => {
@@ -219,22 +215,6 @@ export const FleetAdd: React.FC = () => {
219215 onCancel = { onCancelHandler }
220216 submitButtonText = { t ( 'projects.wizard.submit' ) }
221217 steps = { [
222- {
223- title : 'Project' ,
224- content : (
225- < Container >
226- < SpaceBetween direction = "vertical" size = "l" >
227- < FormInput
228- label = { t ( 'projects.edit.project_name' ) }
229- control = { control }
230- name = "project_name"
231- readOnly
232- disabled = { loading }
233- />
234- </ SpaceBetween >
235- </ Container >
236- ) ,
237- } ,
238218 {
239219 title : 'Settings' ,
240220 info : < InfoLink onFollow = { ( ) => openHelpPanel ( DEFAULT_FLEET_INFO ) } /> ,
0 commit comments