Skip to content

Commit

Permalink
made remoteHub as required field
Browse files Browse the repository at this point in the history
Signed-off-by: JanhaviAlekar <[email protected]>
  • Loading branch information
JanhaviAlekar authored and SahilKr24 committed Sep 6, 2024
1 parent c2c07c0 commit eafda38
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chaoscenter/web/src/api/core/chaoshubs/addChaosHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface CreateChaosHubRequest {
description?: string;
repoURL: string;
repoBranch: string;
remoteHub?: string;
remoteHub: string;
isPrivate: boolean;
authType: AuthType;
token?: string;
Expand Down
1 change: 1 addition & 0 deletions chaoscenter/web/src/strings/strings.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ referencedBy: Referenced By
registry: Registry
registryName: Registry Name
registryType: Registry Type
remoteHub: Select Remote hub
remoteRepo: Remote Repository
remove: Remove
removeMember: Remove Member
Expand Down
1 change: 1 addition & 0 deletions chaoscenter/web/src/strings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ export interface StringsMap {
'registry': unknown
'registryName': unknown
'registryType': unknown
'remoteHub': unknown
'remoteRepo': unknown
'remove': unknown
'removeMember': unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ const GitConnectionStep: React.FC<
}}
validationSchema={Yup.object().shape({
repoBranch: Yup.string().trim().required('Hub Branch name is a required field'),
repoURL: Yup.string().trim().required('Hub Repo name is a required field')
repoURL: Yup.string().trim().required('Hub Repo name is a required field'),
remoteHub: Yup.string().trim().required('Remote Hub name is a required field')
})}
>
{formikProps => {
Expand Down Expand Up @@ -238,7 +239,7 @@ const GitConnectionStep: React.FC<
<FormInput.DropDown
name="remoteHub"
label={<Text font={{ variation: FontVariation.FORM_LABEL }}>Remote Hub</Text>}
placeholder={'Select Remote hub'}
placeholder={getString('remoteHub')}
items={[
{ label: 'GitHub', value: 'GitHub' },
{ label: 'Bitbucket', value: 'Bitbucket' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('ChaosHubMenuView Tests', () => {
name: 'Test Hub',
isDefault: false,
repoURL: '',
remoteHub: '',
repoBranch: '',
projectID: '',
authType: AuthType.SSH,
Expand Down
2 changes: 1 addition & 1 deletion chaoscenter/web/src/views/ChaosHubs/ChaosHubs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const RemoteHubImage = ({ remoteHubName }: { remoteHubName: string }): React.Rea
}
};

return <>{hubSvg()}</>;
return hubSvg();
};

export const ChaosHubsView: React.FC<ChaosHubParams> = ({
Expand Down

0 comments on commit eafda38

Please sign in to comment.