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

[MD]Refactor dev tool to use dataSourceManagement.ui API to get DataSourceSelector #6477

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Apr 16, 2024

Description

  • use const DataSourceSelector = dataSourceManagement.ui.DataSourceSelector instead of direct import DataSourceSelector.
  • remove hideLocalCluster and uiSetting props, since when using those components, data source management plugin side has logic to always pass and overwrite those 2 props.

Issues Resolved

partially fix #6369

Screenshot

iShot_2024-04-16_14.03.23.mp4

Testing the changes

  1. enable datasource from yml
  2. create 2 datasources ds1, ds2, for testing
  3. navigate to dev_tool console, click data source selector dropdown, and expect to see
    • local cluster, ds1, ds2 should show up as option
    • a option with default label show up
    • change default data source, the change will be reflected in the data source selector
  4. set data_source.hideLocalCluster: true in yml, and go to dev tool console again
    • local cluster option should be hidden
  5. disable data source feature flag,
    • data source selector will not display on dev tool console page.

Changelog

  • refactor: Refactor dev tool to use dataSourceManagement.ui API to get DataSourceSelector

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

Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.91%. Comparing base (d2d410b) to head (62128f9).
Report is 6 commits behind head on main.

❗ Current head 62128f9 differs from pull request most recent head c4e81dd. Consider uploading reports for the commit c4e81dd to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6477      +/-   ##
==========================================
+ Coverage   32.93%   34.91%   +1.98%     
==========================================
  Files        2260     1914     -346     
  Lines       45769    37007    -8762     
  Branches     7200     6796     -404     
==========================================
- Hits        15075    12922    -2153     
+ Misses      29984    23227    -6757     
- Partials      710      858     +148     
Flag Coverage Δ
Linux_1 ?
Windows_4 34.91% <ø> (?)

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

BionIT commented Apr 16, 2024

Can we add steps for the testing and screenshots?

@zhongnansu
Copy link
Member Author

Can we add steps for the testing and screenshots?

sure, added test steps and a video

Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

BionIT
BionIT previously approved these changes Apr 16, 2024
Copy link
Contributor

❌ Changeset File Not Added Yet

Please ensure manual commit for changeset file 6477.yml under folder changelogs/fragments to complete this PR. File still missing.

Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "[MD]Refactor dev tool to use dataSourceManagement.ui API to get DataSourceSelector". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

@github-actions github-actions bot added Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry and removed failed changeset labels Apr 16, 2024
Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "refactor". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

@github-actions github-actions bot added failed changeset and removed Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry labels Apr 16, 2024
opensearch-changeset-bot bot added a commit to zhongnansu/OpenSearch-Dashboards that referenced this pull request Apr 17, 2024
@zhongnansu zhongnansu requested a review from BionIT April 17, 2024 01:29
zhongnansu pushed a commit to zhongnansu/OpenSearch-Dashboards that referenced this pull request Apr 17, 2024
@zhongnansu zhongnansu force-pushed the dev-tool-md-refactor branch from d3f803e to 4cfce11 Compare April 17, 2024 18:05
@zhongnansu zhongnansu force-pushed the dev-tool-md-refactor branch from 4cfce11 to c238e2f Compare April 17, 2024 21:16
@ZilongX
Copy link
Collaborator

ZilongX commented Apr 17, 2024

pick up latest main and re-running all checks

@zhongnansu zhongnansu merged commit fb76ee9 into opensearch-project:main Apr 18, 2024
65 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 18, 2024
…ourceSelector (#6477)

* Refactor dev tool to use dataSourceManagement.ui interfaces to obtain DataSourceSelector

Signed-off-by: Zhongnan Su <[email protected]>
(cherry picked from commit fb76ee9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
zhongnansu pushed a commit that referenced this pull request Apr 18, 2024
…ourceSelector (#6477)

* Refactor dev tool to use dataSourceManagement.ui interfaces to obtain DataSourceSelector

Signed-off-by: Zhongnan Su <[email protected]>
(cherry picked from commit fb76ee9)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
BionIT pushed a commit that referenced this pull request Apr 18, 2024
…ourceSelector (#6477) (#6521)

* Refactor dev tool to use dataSourceManagement.ui interfaces to obtain DataSourceSelector


(cherry picked from commit fb76ee9)

Signed-off-by: Zhongnan Su <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
4 participants