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

feat: introducing workspace level ui settings and hide non-global ui settings from advance settings page #8500

Conversation

ruanyl
Copy link
Member

@ruanyl ruanyl commented Oct 5, 2024

Description

UI changes:
Make defaultIndex pattern a workspace ui setting when workspace is on and make it a global setting when workspace is off

Issues Resolved

Screenshot

Workspace disabled:
image

Workspace enabled:
image

Testing the changes

Changelog

  • feat: introducing workspace level ui settings and hide non-global ui settings from advance settings 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

ui settings from advance settings page

+ make defaultIndex pattern a workspace ui setting when workspace is on
  and make it a global setting when workspace is off

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Copy link
Contributor

github-actions bot commented Oct 5, 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 5, 2024

Codecov Report

Attention: Patch coverage is 65.71429% with 12 lines in your changes missing coverage. Please review.

Project coverage is 60.95%. Comparing base (2f90def) to head (5c0f79f).
Report is 96 commits behind head on main.

Files with missing lines Patch % Lines
...ttings/public/management_app/advanced_settings.tsx 25.00% 5 Missing and 1 partial ⚠️
src/core/server/workspace/mocks.ts 83.33% 2 Missing ⚠️
src/core/server/workspace/workspace_service.ts 80.00% 2 Missing ⚠️
src/plugins/data/server/plugin.ts 0.00% 1 Missing ⚠️
src/plugins/data/server/ui_settings.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8500   +/-   ##
=======================================
  Coverage   60.95%   60.95%           
=======================================
  Files        3766     3768    +2     
  Lines       89364    89396   +32     
  Branches    13978    13981    +3     
=======================================
+ Hits        54468    54492   +24     
- Misses      31498    31506    +8     
  Partials     3398     3398           
Flag Coverage Δ
Linux_1 28.96% <37.03%> (+<0.01%) ⬆️
Linux_2 56.32% <77.77%> (+0.02%) ⬆️
Linux_3 37.76% <34.28%> (+<0.01%) ⬆️
Linux_4 29.93% <37.03%> (+<0.01%) ⬆️
Windows_1 28.98% <37.03%> (+<0.01%) ⬆️
Windows_2 56.27% <77.77%> (+0.02%) ⬆️
Windows_3 37.76% <34.28%> (-0.01%) ⬇️
Windows_4 29.93% <37.03%> (+<0.01%) ⬆️

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.

SuZhou-Joe
SuZhou-Joe previously approved these changes Oct 7, 2024
@SuZhou-Joe
Copy link
Member

CI failed, not sure if related.

ruanyl added 3 commits October 7, 2024 16:17
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Comment on lines +37 to +40
// cannot import from core/server due to src/core/server/saved_objects/opensearch_query.js which
// export { opensearchKuery } from '../../../plugins/data/server';
// eslint-disable-next-line @osd/eslint/no-restricted-paths
import { UiSettingScope } from '../../../core/server/ui_settings/types';
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this impacts build?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Actually, if importing from core/server, it only affects the unit tests in create_or_upgrade_saved_config.test.ts

@ruanyl ruanyl merged commit 91fd6d3 into opensearch-project:main Oct 10, 2024
68 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 10, 2024
…settings from advance settings page (#8500)

* feat: introducing workspace level ui settings and hide non-global
ui settings from advance settings page

+ make defaultIndex pattern a workspace ui setting when workspace is on
  and make it a global setting when workspace is off

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* Changeset file for PR #8500 created/updated

* fix: failed tests

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: lint

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 91fd6d3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Oct 11, 2024
…settings from advance settings page (#8500) (#8539)

* feat: introducing workspace level ui settings and hide non-global
ui settings from advance settings page

+ make defaultIndex pattern a workspace ui setting when workspace is on
  and make it a global setting when workspace is off


---------



(cherry picked from commit 91fd6d3)

Signed-off-by: Yulong Ruan <ruanyl@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>
Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Oct 30, 2024
…settings from advance settings page (opensearch-project#8500)

* feat: introducing workspace level ui settings and hide non-global
ui settings from advance settings page

+ make defaultIndex pattern a workspace ui setting when workspace is on
  and make it a global setting when workspace is off

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* Changeset file for PR opensearch-project#8500 created/updated

* fix: failed tests

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* fix: lint

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.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.

4 participants