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

[navigation]feat: add sample data menu back #8076

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Sep 8, 2024

Description

In release 2.17 we won't make import sample data into a modal so we need to add the menu back.

Issues Resolved

Screenshot

image

Testing the changes

Changelog

  • feat: [navigation] Add sample data menu back

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: SuZhou-Joe <[email protected]>
Copy link

codecov bot commented Sep 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 60.60%. Comparing base (e621422) to head (0dfc827).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/core/server/utils/auth_info.ts 0.00% 1 Missing and 2 partials ⚠️
src/plugins/home/public/plugin.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8076      +/-   ##
==========================================
+ Coverage   60.58%   60.60%   +0.01%     
==========================================
  Files        3738     3738              
  Lines       88671    88677       +6     
  Branches    13782    13784       +2     
==========================================
+ Hits        53724    53741      +17     
+ Misses      31662    31650      -12     
- Partials     3285     3286       +1     
Flag Coverage Δ
Linux_1 28.76% <0.00%> (-0.01%) ⬇️
Linux_2 56.26% <0.00%> (-0.01%) ⬇️
Linux_3 37.51% <0.00%> (+<0.01%) ⬆️
Linux_4 29.60% <0.00%> (-0.01%) ⬇️
Windows_1 28.79% <0.00%> (+0.01%) ⬆️
Windows_2 56.22% <0.00%> (-0.01%) ⬇️
Windows_3 37.52% <0.00%> (+0.01%) ⬆️
Windows_4 29.60% <0.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.

Signed-off-by: SuZhou-Joe <[email protected]>
@@ -31,7 +32,9 @@ export const getPrincipalsFromRequest = (
if (authState?.authInfo?.backend_roles) {
payload[PrincipalType.Groups] = authState.authInfo.backend_roles;
}
if (authState?.authInfo?.user_name) {
if (authState?.authInfo?.user_id) {
Copy link
Member

Choose a reason for hiding this comment

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

This seems unrelated, is it by accident?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, as the change is minor so I want to include the change into in this PR as well. No need to raise a new PR for such 1 line change.

category: DEFAULT_APP_CATEGORIES.manageWorkspace,
order: 300,
},
{
id: WORKSPACE_DETAIL_APP_ID,
id: 'import_sample_data',
Copy link
Member

Choose a reason for hiding this comment

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

Do we still have sample data card in overview pages?

Copy link
Member Author

@SuZhou-Joe SuZhou-Joe Sep 9, 2024

Choose a reason for hiding this comment

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

Yes, but we still need the menu in left nav or the bread crumb info of sample data page will be broken.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am having a hard time finding the Add Sample Data card in the workspaces other than Search. Is this something we added in the past day or two?

@SuZhou-Joe SuZhou-Joe merged commit faac756 into opensearch-project:main Sep 10, 2024
65 of 67 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-8076-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 faac756e4c6985e7a3dd7a62dc25e9a3b624b0d9
# Push it to GitHub
git push --set-upstream origin backport/backport-8076-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-8076-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.17 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.17
# Create a new branch
git switch --create backport/backport-8076-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 faac756e4c6985e7a3dd7a62dc25e9a3b624b0d9
# Push it to GitHub
git push --set-upstream origin backport/backport-8076-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.17

Then, create a pull request where the base branch is 2.17 and the compare/head branch is backport/backport-8076-to-2.17.

SuZhou-Joe added a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Sep 10, 2024
* feat: add sample data back

Signed-off-by: SuZhou-Joe <[email protected]>

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

* fix: unit test failure

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit faac756)
SuZhou-Joe added a commit that referenced this pull request Sep 10, 2024
* feat: add sample data back

Signed-off-by: SuZhou-Joe <[email protected]>

* Changeset file for PR #8076 created/updated

* fix: unit test failure

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit faac756)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 10, 2024
* feat: add sample data back

Signed-off-by: SuZhou-Joe <[email protected]>

* Changeset file for PR #8076 created/updated

* fix: unit test failure

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit faac756)
(cherry picked from commit 0a42d64)
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 Sep 10, 2024
* feat: add sample data back

Signed-off-by: SuZhou-Joe <[email protected]>

* Changeset file for PR #8076 created/updated

* fix: unit test failure

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit faac756)
(cherry picked from commit 0a42d64)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Sep 10, 2024
* feat: add sample data back



* Changeset file for PR #8076 created/updated

* fix: unit test failure



---------



(cherry picked from commit faac756)
(cherry picked from commit 0a42d64)

Signed-off-by: SuZhou-Joe <[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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Sep 10, 2024
* feat: add sample data back



* Changeset file for PR #8076 created/updated

* fix: unit test failure



---------



(cherry picked from commit faac756)
(cherry picked from commit 0a42d64)

Signed-off-by: SuZhou-Joe <[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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[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.

4 participants