Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Su <szhongna@amazon.com>
  • Loading branch information
zhongnansu committed Apr 5, 2023
1 parent 1ca3663 commit 953bc10
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class CreateDataSourceForm extends React.Component<
});
};

onChangeAuthType = (e: { target: { value: any } }) => {
onChangeAuthType = (e: React.ChangeEvent<HTMLSelectElement>) => {
this.setState({ auth: { ...this.state.auth, type: e.target.value as AuthType } });
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ describe('Datasource Management: Edit Datasource Form', () => {
});

/* Save Changes */
test('should update the form with NoAUth on click save chan ges', async () => {
test('should update the form with NoAuth on click save changes', async () => {
await new Promise((resolve) =>
setTimeout(() => {
updateInputFieldAndBlur(component, descriptionFieldIdentifier, '');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class EditDataSourceForm extends React.Component<EditDataSourceProps, Edi
});
};

onChangeAuthType = (e: { target: { value: any } }) => {
onChangeAuthType = (e: React.ChangeEvent<HTMLSelectElement>) => {
this.setState({ auth: { ...this.state.auth, type: e.target.value as AuthType } }, () => {
this.onChangeFormValues();
});
Expand Down Expand Up @@ -738,13 +738,6 @@ export class EditDataSourceForm extends React.Component<EditDataSourceProps, Edi
defaultMessage: 'Credential',
})}
>
{/* <EuiRadioGroup
options={credentialSourceOptions}
idSelected={this.state.auth.type}
onChange={(id) => this.onChangeAuthType(id)}
name="Credential"
data-test-subj="editDataSourceSelectAuthType"
/> */}
<EuiSelect
options={credentialSourceOptions}
value={this.state.auth.type}
Expand Down
6 changes: 0 additions & 6 deletions src/plugins/data_source_management/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ export enum AuthType {
SigV4 = 'sigv4',
}

// export const credentialSourceOptions = [
// { id: AuthType.NoAuth, label: 'No authentication' },
// { id: AuthType.UsernamePasswordType, label: 'Username & Password' },
// { id: AuthType.SigV4, label: 'AWS SigV4' },
// ];

export const credentialSourceOptions = [
{ value: AuthType.NoAuth, text: 'No authentication' },
{ value: AuthType.UsernamePasswordType, text: 'Username & Password' },
Expand Down

0 comments on commit 953bc10

Please sign in to comment.