Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Multiple DataSource]Refactor authentication type selection in create and edit data source forms #3693

Merged

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Mar 26, 2023

Description

[Multiple DataSource]Refactor authentication type selection in create and edit data source forms to use EuiSelect component
Based on #2110 (comment), I made the UI changes to multiple datasource creation page

Current UI:
image

Updated UI:
image
image

Issues Resolved

#3551
#2110 (comment)

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@zhongnansu zhongnansu requested a review from a team as a code owner March 26, 2023 04:08
@zhongnansu zhongnansu added multiple datasource multiple datasource project backport 2.x v2.7.0 refactor Tech debt related tasks that need refactoring labels Mar 26, 2023
@zhongnansu zhongnansu changed the title [Multiple DataSource]Refactor authentication type selection in create and edit data source forms to use EuiSelect component [Multiple DataSource]Refactor authentication type selection in create and edit data source forms to use EuiSelect Mar 26, 2023
@zhongnansu zhongnansu changed the title [Multiple DataSource]Refactor authentication type selection in create and edit data source forms to use EuiSelect [Multiple DataSource]Refactor authentication type selection in create and edit data source forms Mar 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2023

Codecov Report

Merging #3693 (8cce371) into main (6b42669) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #3693      +/-   ##
==========================================
- Coverage   66.43%   66.38%   -0.05%     
==========================================
  Files        3210     3210              
  Lines       61677    61676       -1     
  Branches     9522     9522              
==========================================
- Hits        40977    40946      -31     
- Misses      18419    18445      +26     
- Partials     2281     2285       +4     
Flag Coverage Δ
Linux 66.38% <100.00%> (+<0.01%) ⬆️
Windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/plugins/data_source_management/public/types.ts 100.00% <ø> (ø)
...components/create_form/create_data_source_form.tsx 75.00% <100.00%> (ø)
...rce/components/edit_form/edit_data_source_form.tsx 67.69% <100.00%> (-0.17%) ⬇️

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

kristenTian
kristenTian previously approved these changes Mar 31, 2023
@kristenTian
Copy link
Contributor

Could we just confirm with UX the layout is what's been advised?

@zhongnansu
Copy link
Member Author

Could we just confirm with UX the layout is what's been advised?

@KrooshalUX Kroosh, could you take a look?

@KrooshalUX
Copy link

KrooshalUX commented Apr 4, 2023

Could we just confirm with UX the layout is what's been advised?

@KrooshalUX Kroosh, could you take a look?

Assuming this is using OuiSelect - good to go from my perspective.

@ashwin-pc ashwin-pc self-assigned this Apr 5, 2023
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments about the implementation and types. Functionality looks good.

… forms to use EuiSelect instead of EuiRadioGroup for better user experience

Signed-off-by: Su <[email protected]>
Signed-off-by: Su <[email protected]>
@zhongnansu
Copy link
Member Author

@ashwin-pc @kristenTian addressed all comments, and resolve conflict in changelog, plz take another look, thx

ashwin-pc
ashwin-pc previously approved these changes Apr 5, 2023
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

idSelected={this.state.auth.type}
onChange={(id) => this.onChangeAuthType(id)}
value={this.state.auth.type}
onChange={(e) => this.onChangeAuthType(e)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onChange={(e) => this.onChangeAuthType(e)}
onChange={this.onChangeAuthType}

nit: not blocking the PR for this though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made the change

AMoo-Miki
AMoo-Miki previously approved these changes Apr 5, 2023
CHANGELOG.md Outdated
@@ -167,6 +167,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Vis Builder] Removed Hard Coded Strings and Used i18n to transalte([#2867](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2867))
- [Console] Replace jQuery.ajax with core.http when calling OSD APIs in console ([#3080](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3080))
- [I18n] Fix Listr type errors and error handlers ([#3629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3629))
- [Multiple DataSource]Refactor authentication type selection in create and edit data source forms to use EuiSelect ([#3693](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3693))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Multiple DataSource]Refactor authentication type selection in create and edit data source forms to use EuiSelect ([#3693](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3693))
- [Multiple DataSource] Present the authentication type choices in a drop-down ([#3693](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3693))

How does this sound?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sound nicer!

Comment on lines 60 to 62
{ value: AuthType.NoAuth, text: 'No authentication' },
{ value: AuthType.UsernamePasswordType, text: 'Username & Password' },
{ value: AuthType.SigV4, text: 'AWS SigV4' },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use i18n for these?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of course

@zhongnansu zhongnansu merged commit 44e2e34 into opensearch-project:main Apr 5, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 5, 2023
… and edit data source forms (#3693)

* Refactor authentication type selection in create and edit data source forms to use EuiSelect instead of EuiRadioGroup for better user experience

Signed-off-by: Su <[email protected]>
(cherry picked from commit 44e2e34)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
zhongnansu pushed a commit that referenced this pull request Apr 6, 2023
… and edit data source forms (#3693) (#3790)

* Refactor authentication type selection in create and edit data source forms to use EuiSelect instead of EuiRadioGroup for better user experience

Signed-off-by: Su <[email protected]>
(cherry picked from commit 44e2e34)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sikhote pushed a commit to sikhote/OpenSearch-Dashboards that referenced this pull request Apr 24, 2023
… and edit data source forms (opensearch-project#3693)

* Refactor authentication type selection in create and edit data source forms to use EuiSelect instead of EuiRadioGroup for better user experience

Signed-off-by: Su <[email protected]>
Signed-off-by: David Sinclair <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x multiple datasource multiple datasource project refactor Tech debt related tasks that need refactoring v2.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Multiple Datasource] Convert authentication method from radio button to dropdown list
6 participants