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

Register Datasource Picker in the top nav menu for Get Started Tab #1818

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Mar 7, 2024

Description

Registers the new DataSource picker component from core in the top nav menu for the "Get Started" Tab.

Category

[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
New feature

Why these changes are required?

What is the old behavior before changes and new behavior after changes?

Old behavior is no selector, new behavior is shown in this video:

Screen.Recording.2024-03-20.at.10.53.21.AM.mov

Issues Resolved

[List any issues this PR will resolve (Is this a backport? If so, please add backport PR # and/or commits #)]

Fix: #1796, Fix: #1816 Fix: #1795

Testing

Manual testing, unit tests added, e2e cypress test added

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@derek-ho derek-ho changed the title Register Datasource Picker in the top nav menu [WIP] Register Datasource Picker in the top nav menu Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 73.68421% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 67.65%. Comparing base (942b2f7) to head (be2c0fb).

Files Patch % Lines
public/apps/configuration/utils/request-utils.ts 0.00% 2 Missing ⚠️
public/apps/configuration/configuration-app.tsx 0.00% 1 Missing ⚠️
public/apps/configuration/top-nav-menu.tsx 85.71% 1 Missing ⚠️
public/plugin.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                             Coverage Diff                             @@
##           feature/supporting-multiple-datasources    #1818      +/-   ##
===========================================================================
+ Coverage                                    67.52%   67.65%   +0.13%     
===========================================================================
  Files                                           94       95       +1     
  Lines                                         2414     2427      +13     
  Branches                                       327      330       +3     
===========================================================================
+ Hits                                          1630     1642      +12     
- Misses                                         706      707       +1     
  Partials                                        78       78              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DarshitChanpura DarshitChanpura force-pushed the top-nav-menu branch 4 times, most recently from 08668bc to 6a27220 Compare March 14, 2024 16:04
@derek-ho derek-ho changed the base branch from main to feature/supporting-multiple-datasources March 14, 2024 16:04
@DarshitChanpura DarshitChanpura force-pushed the top-nav-menu branch 7 times, most recently from 2a0ba26 to 95158fa Compare March 14, 2024 16:32
@DarshitChanpura DarshitChanpura force-pushed the feature/supporting-multiple-datasources branch from 929dd88 to 942b2f7 Compare March 14, 2024 16:52
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@derek-ho derek-ho changed the title [WIP] Register Datasource Picker in the top nav menu Register Datasource Picker in the top nav menu for Get Started Tab Mar 14, 2024
@derek-ho derek-ho marked this pull request as ready for review March 14, 2024 19:15
Signed-off-by: Derek Ho <dxho@amazon.com>
Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

looks close to me from the first pass. left some comments. Thanks @derek-ho for taking this on!

public/apps/configuration/panels/get-started.tsx Outdated Show resolved Hide resolved
public/apps/configuration/top-nav-menu.tsx Show resolved Hide resolved
public/plugin.ts Outdated Show resolved Hide resolved
server/plugin.ts Show resolved Hide resolved
server/routes/index.ts Outdated Show resolved Hide resolved
server/routes/index.ts Outdated Show resolved Hide resolved
server/routes/index.ts Outdated Show resolved Hide resolved
test/cypress/support/commands.js Outdated Show resolved Hide resolved
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@@ -745,21 +747,20 @@ export function defineRoutes(router: IRouter) {
router.delete(
{
path: `${API_PREFIX}/configuration/cache`,
validate: false,
validate: {
body: schema.object({
Copy link
Member

Choose a reason for hiding this comment

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

Should dataSourceId(s) always be passed in as query params?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea, since we control all the places this is called (only in the get started tab) I think it's fine to require it. This isn't using query params though it's only an internal implementation. However I think this is a two way door decision and once more routes are modified we can easily refactor it to a cleaner way if we find one

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If that makes sense can you merge? Thanks!

@DarshitChanpura DarshitChanpura merged commit 4ba9fcf into opensearch-project:feature/supporting-multiple-datasources Mar 20, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants