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] Add component to show single selected data source in read only mode #6125

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

BionIT
Copy link
Collaborator

@BionIT BionIT commented Mar 12, 2024

Description

This change adds component to show single selected data source in read only mode

Issues Resolved

Screenshot

readonlysingle.mp4

Testing the changes

The following were performed in the recording:

  1. enable data source plugin, and see the mounted single selected data source component
  2. when clicking on the info icon, a drop down shows which displays the currently used data source
  3. disable data source plugin, and we should not see the mounted single selected data source component

Check List

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

Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
@Flyingliuhub
Copy link
Member

@BionIT can we add the changelog? Thanks

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 67.15%. Comparing base (45096bb) to head (5905527).

Files Patch % Lines
...c/components/data_source_view/data_source_view.tsx 61.53% 2 Missing and 3 partials ⚠️
...c/components/data_source_menu/data_source_menu.tsx 57.14% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6125      +/-   ##
==========================================
- Coverage   67.15%   67.15%   -0.01%     
==========================================
  Files        3326     3327       +1     
  Lines       64400    64415      +15     
  Branches    10361    10366       +5     
==========================================
+ Hits        43251    43260       +9     
- Misses      18619    18622       +3     
- Partials     2530     2533       +3     
Flag Coverage Δ
Linux_1 31.73% <ø> (ø)
Linux_2 55.23% <ø> (ø)
Linux_3 44.75% <60.00%> (-0.01%) ⬇️
Linux_4 35.06% <0.00%> (-0.02%) ⬇️
Windows_1 31.75% <ø> (ø)
Windows_2 55.20% <ø> (ø)
Windows_3 44.77% <60.00%> (+0.01%) ⬆️
Windows_4 35.06% <0.00%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BionIT
Copy link
Collaborator Author

BionIT commented Mar 12, 2024

@BionIT can we add the changelog? Thanks

yeah, the change log has been added!

iconType="database"
iconSide="left"
size="s"
disabled={true}
Copy link
Member

Choose a reason for hiding this comment

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

should we have some condition here to dynamically compute the value of disabled? like as somethingthis.props.selectedOption ? Thanks

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is always disabled based on requirements, since this component is only used in readyonly mode

hideLocalCluster: boolean;
dataSourceCallBackFunc: (dataSource: DataSourceOption) => void;
hideLocalCluster?: boolean;
dataSourceCallBackFunc?: (dataSource: DataSourceOption) => void;
Copy link
Member

@xinruiba xinruiba Mar 12, 2024

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the callback function doesn't make sense for read only component, since there is no change to the selection, but only makes sense for selectables, hope it makes sense

Copy link
Member

@xinruiba xinruiba Mar 13, 2024

Choose a reason for hiding this comment

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

Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
ZilongX
ZilongX previously approved these changes Mar 12, 2024
@ZilongX ZilongX self-requested a review March 13, 2024 02:59
@BionIT BionIT merged commit df6de4e into opensearch-project:main Mar 13, 2024
66 of 69 checks passed
@BionIT BionIT added v2.14.0 multiple datasource multiple datasource project labels Mar 13, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 25, 2024
…ce in read only mode (#6125)

* add component to show selected data source in read only mode

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add change log

Signed-off-by: Lu Yu <nluyu@amazon.com>

* fix typo and remove unused fields

Signed-off-by: Lu Yu <nluyu@amazon.com>

* fix snapshot

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit df6de4e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
BionIT pushed a commit that referenced this pull request Mar 25, 2024
…ce in read only mode (#6125) (#6262)

* add component to show selected data source in read only mode

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add change log

Signed-off-by: Lu Yu <nluyu@amazon.com>

* fix typo and remove unused fields

Signed-off-by: Lu Yu <nluyu@amazon.com>

* fix snapshot

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit df6de4e)
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants