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

[Workspace]Restrict at least one data source in workspace creation page #8461

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Oct 3, 2024

Description

This PR is for adding required restriction for data source selector in workspace creation page. The create workspace button will be disabled if no data sources assigned. It added a empty prompt message for indicate this behavior when no data source assigned. This PR also removed the populated workspace name.

Screenshot

image

Testing the changes

  • Clone branch code and run yarn osd bootstrap --single-version loose
  • Add below configs in config/opensearch_dashboards.yml
savedObjects.permission.enabled: true
workspace.enabled: true
uiSettings:
  overrides:
    'home:useNewHomePage': true
opensearchDashboards.dashboardAdmin.users: ['admin']
  • Run yarn start --no-base-path
  • Login with admin user and go to workspace create page by bottom left menu
  • No workspace name will be populated
  • The create workspace button should be disabled until data source assigned
  • The empty message in data source selector should like screenshot above

Changelog

  • feat: [Workspace]Restrict at least one data source in workspace creation page

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: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Copy link
Contributor

github-actions bot commented Oct 3, 2024

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link
Contributor

github-actions bot commented Oct 3, 2024

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.95%. Comparing base (49cca7b) to head (82ba854).
Report is 120 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8461      +/-   ##
==========================================
- Coverage   60.95%   60.95%   -0.01%     
==========================================
  Files        3758     3758              
  Lines       89326    89331       +5     
  Branches    13974    13977       +3     
==========================================
+ Hits        54453    54456       +3     
- Misses      31481    31482       +1     
- Partials     3392     3393       +1     
Flag Coverage Δ
Linux_1 28.93% <100.00%> (+<0.01%) ⬆️
Linux_2 56.35% <ø> (ø)
Linux_3 37.78% <ø> (ø)
Linux_4 29.95% <ø> (ø)
Windows_1 28.94% <100.00%> (+<0.01%) ⬆️
Windows_2 56.31% <ø> (ø)
Windows_3 37.78% <ø> (ø)
Windows_4 29.95% <ø> (ø)

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.

…ace-create

Signed-off-by: Lin Wang <wonglam@amazon.com>
@Hailong-am Hailong-am merged commit ec4b9d7 into opensearch-project:main Oct 3, 2024
71 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 3, 2024
…ge (#8461)

* Restrict at least one data sources for workspace creation

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update empty data sources panel UI

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #8461 created/updated

* Fix wrong testing id for data source empty state

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove populate workspace name

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit ec4b9d7)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Hailong-am pushed a commit that referenced this pull request Oct 4, 2024
…ge (#8461) (#8468)

* Restrict at least one data sources for workspace creation



* Update empty data sources panel UI



* Changeset file for PR #8461 created/updated

* Fix wrong testing id for data source empty state



* Remove populate workspace name



---------



(cherry picked from commit ec4b9d7)

Signed-off-by: Lin Wang <wonglam@amazon.com>
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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@ananzh ananzh added the v2.18.0 label Oct 30, 2024
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