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

[VizBuilder] Create a new wizard directly on a dashboard #2384

Merged

Conversation

abbyhu2000
Copy link
Member

Description

After selecting a dashboard, create a new wizard directly from the dashboard and have the option to add to that dashboard.

Signed-off-by: abbyhu2000 abigailhu2000@gmail.com

Issues Resolved

resolves #2381

Check List

  • New functionality includes testing.
    • All tests pass
      • yarn test:jest
      • yarn test:jest_integration
      • yarn test:ftr
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

@abbyhu2000 abbyhu2000 marked this pull request as ready for review September 17, 2022 01:07
@abbyhu2000 abbyhu2000 requested a review from a team as a code owner September 17, 2022 01:07
@abbyhu2000 abbyhu2000 self-assigned this Sep 17, 2022
@abbyhu2000 abbyhu2000 changed the title Create a new wizard directly on a dashboard [VizBuilder] Create a new wizard directly on a dashboard Sep 17, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2022

Codecov Report

Merging #2384 (baaa10b) into main (a528965) will increase coverage by 0.03%.
The diff coverage is 72.54%.

@@            Coverage Diff             @@
##             main    #2384      +/-   ##
==========================================
+ Coverage   66.75%   66.78%   +0.03%     
==========================================
  Files        3200     3201       +1     
  Lines       60886    60914      +28     
  Branches     9250     9254       +4     
==========================================
+ Hits        40644    40682      +38     
+ Misses      18030    18019      -11     
- Partials     2212     2213       +1     
Impacted Files Coverage Δ
...cation/components/doc/use_opensearch_doc_search.ts 90.90% <ø> (ø)
...s/wizard/public/application/components/top_nav.tsx 5.00% <0.00%> (-0.89%) ⬇️
src/plugins/wizard/public/plugin.ts 27.58% <ø> (ø)
...rd/public/application/utils/get_top_nav_config.tsx 66.66% <75.75%> (+62.82%) ⬆️
...c/plugins/wizard/public/application/utils/mocks.ts 100.00% <100.00%> (ø)
src/plugins/expressions/public/mocks.tsx 93.33% <0.00%> (+6.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@abbyhu2000 abbyhu2000 force-pushed the add_wizard_to_dashboard branch 2 times, most recently from 099eb50 to 4329340 Compare September 28, 2022 00:51
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

partial review

yarn.lock Outdated Show resolved Hide resolved
ashwin-pc
ashwin-pc previously approved these changes Oct 4, 2022
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Ship it 🚢

After selecting a dashboard, create a new wizard directly from the dashboard and have the option to add to that dashboard.

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
@abbyhu2000 abbyhu2000 force-pushed the add_wizard_to_dashboard branch 2 times, most recently from 0f900b3 to baaa10b Compare October 4, 2022 17:48
ananzh
ananzh previously approved these changes Oct 4, 2022
Copy link
Member

@ananzh ananzh left a comment

Choose a reason for hiding this comment

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

LGTM

joshuarrrr
joshuarrrr previously approved these changes Oct 4, 2022
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for cleaning up the existing implementation and adding some nice unit tests. A few minor questions and suggestions, but nothing blocking.

src/plugins/wizard/public/application/utils/mocks.ts Outdated Show resolved Hide resolved
Comment on lines +26 to +36
savedWizardVis = {
id: '1',
title: 'save wizard wiz title',
description: '',
visualizationState: '',
styleState: '',
version: 0,
copyOnSave: true,
searchSourceFields: {},
save: jest.fn().mockReturnValue('1'),
};
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there's some existing way to automock saved objects from their definitions... this definitely works, but seems like something you shouldn't really have to do.

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-2384-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b75e07dd45d4d6b189fbd177ee5bad60a1d08505
# Push it to GitHub
git push --set-upstream origin backport/backport-2384-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

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

abbyhu2000 added a commit to abbyhu2000/OpenSearch-Dashboards that referenced this pull request Oct 28, 2022
…project#2384)

* Create a new wizard directly on a dashboard

After selecting a dashboard, create a new wizard directly from the dashboard and have the option to add to that dashboard.

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* hook change to solve browser warning

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Move onsave out from getTopNavConfig function and added unit tests

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Add changelog

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
(cherry picked from commit b75e07d)
abbyhu2000 added a commit to abbyhu2000/OpenSearch-Dashboards that referenced this pull request Oct 28, 2022
…project#2384)

* Create a new wizard directly on a dashboard

After selecting a dashboard, create a new wizard directly from the dashboard and have the option to add to that dashboard.

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* hook change to solve browser warning

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Move onsave out from getTopNavConfig function and added unit tests

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Add changelog

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
@AMoo-Miki AMoo-Miki added the enhancement New feature or request label Nov 5, 2022
sipopo pushed a commit to sipopo/OpenSearch-Dashboards that referenced this pull request Dec 16, 2022
…project#2384)

* Create a new wizard directly on a dashboard

After selecting a dashboard, create a new wizard directly from the dashboard and have the option to add to that dashboard.

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* hook change to solve browser warning

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Move onsave out from getTopNavConfig function and added unit tests

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Add changelog

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: Sergey V. Osipov <sipopo@yandex.ru>
@abbyhu2000 abbyhu2000 deleted the add_wizard_to_dashboard branch June 30, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x enhancement New feature or request v2.4.0 'Issues and PRs related to version v2.4.0' vis builder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[VizBuilder] Create a new wizard directly on dashboard
6 participants