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] [Bug] Fix index pattern issue #8718

Merged

Conversation

yubonluo
Copy link
Contributor

@yubonluo yubonluo commented Oct 28, 2024

Description

Fix index pattern issue:

  1. When workspace is enabled, there should not be a global default index pattern setting, the "Set as default" button should not be displayed in "Global assets" → "inspect" page.

  2. The current workspace default index pattern setting extends the global value, but this is not expected, we should fix this by not extending from global setting for workspace default index pattern. If non-workspace-admin user has no the permission of the global index pattern and the default index pattern of workspace level, they can not load the dashboard
    image

  3. Inspect button should go to the link inside a workspace.

Issues Resolved

N/A

Screenshot

  1. Hidden "Set as default" button if user navigate to the global index pattern inspect page by url
image
  1. If the global default index pattern is 4a3131c0-94ee-11ef-a923-9f39d35cdf7c_b4c0b625-ee20-4afd-aa13-da0866f0b117
    There is no default index pattern in the current workspace and current user have no the permission of the global index pattern, the dashboard page should load normally
image
  1. Clicking inspect button should go to the link inside a workspace.
2024-10-28.18.16.00.mp4

Testing the changes

Changelog

  • fix: [Workspace] [Bug] Fix index pattern issue.

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 Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.74%. Comparing base (863f211) to head (ea66730).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8718      +/-   ##
==========================================
- Coverage   60.74%   60.74%   -0.01%     
==========================================
  Files        3798     3798              
  Lines       90660    90662       +2     
  Branches    14259    14259              
==========================================
  Hits        55072    55072              
- Misses      32092    32093       +1     
- Partials     3496     3497       +1     
Flag Coverage Δ
Linux_1 29.06% <100.00%> (+<0.01%) ⬆️
Linux_2 56.39% <ø> (ø)
Linux_3 37.58% <100.00%> (-0.01%) ⬇️
Linux_4 29.83% <100.00%> (+<0.01%) ⬆️
Windows_1 29.08% <100.00%> (+<0.01%) ⬆️
Windows_2 56.34% <ø> (ø)
Windows_3 37.58% <100.00%> (+<0.01%) ⬆️
Windows_4 29.83% <100.00%> (+<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.

ruanyl
ruanyl previously approved these changes Oct 28, 2024
Signed-off-by: yubonluo <[email protected]>
@ashwin-pc
Copy link
Member

Does this need a backport?

@yubonluo
Copy link
Contributor Author

Does this need a backport?

Yes, this pr needs to be backported into 2.x.

@Hailong-am Hailong-am merged commit 815f466 into opensearch-project:main Oct 29, 2024
72 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 29, 2024
Signed-off-by: yubonluo <[email protected]>
(cherry picked from commit 815f466)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 29, 2024
Signed-off-by: yubonluo <[email protected]>
(cherry picked from commit 815f466)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Oct 29, 2024
(cherry picked from commit 815f466)

Signed-off-by: yubonluo <[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>
Hailong-am pushed a commit that referenced this pull request Oct 29, 2024
(cherry picked from commit 815f466)

Signed-off-by: yubonluo <[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>
Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request 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