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

[Manual backport 2.x] [Discover]Sample Queries and Saved Queries in No Results Page #8616 #8663

Merged
merged 3 commits into from
Oct 19, 2024

Conversation

AMoo-Miki
Copy link
Collaborator

@AMoo-Miki AMoo-Miki commented Oct 19, 2024

Cherry-picked commit 17103ba from #8651
Cherry-picked commit 6659139 from #8613
Cherry-picked commit 9da1b77 from #8616

AMoo-Miki and others added 3 commits October 18, 2024 17:22
* Update Discover appearance

Signed-off-by: Miki <miki@amazon.com>

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

---------

Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

(cherry picked from commit 17103ba)
Signed-off-by: Miki <miki@amazon.com>
…election in Discover View (opensearch-project#8613)

* Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View

This PR primarily addresses the scenario when no index patterns (general) is available in the Discover view.
Instead of redirecting users to the index management page, it introduces a new "No Index Patterns" panel.
This panel provides users with the option to open a data selector and add index patterns
directly from the Discover view, improving the user experience for new or empty deployments.

To achieve, we move the selectedDataset state from ConnectedDatasetSelector to the app container's
state management. This allows the AdvancedSelector, opened from the AppContainer, to update
the dataset state effectively. Key changes include:

* Implementing NoIndexPatternsPanel and AdvancedSelector components.
* Refactoring dataset state management in AppContainer and Sidebar.
* Modifying DiscoverCanvas to conditionally render NoIndexPatternsPanel.
* Updating ConnectedDatasetSelector to use shared state and dataset change handling.

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* use i18n

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* fix comments

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Miki <miki@amazon.com>

(cherry picked from commit 6659139)
Signed-off-by: Miki <miki@amazon.com>
…arch-project#8616)

* Sample Queries and Saved Queries in No Results Page

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

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

* Update styling

Signed-off-by: Miki <miki@amazon.com>

---------

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Miki <miki@amazon.com>
(cherry picked from commit 9da1b77)
Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 17.26619% with 115 lines in your changes missing coverage. Please review.

Project coverage is 60.89%. Comparing base (dff25a9) to head (1988da8).
Report is 2 commits behind head on 2.x.

Files with missing lines Patch % Lines
...ublic/application/view_components/canvas/index.tsx 0.00% 34 Missing ⚠️
...c/application/components/no_results/no_results.tsx 4.34% 22 Missing ⚠️
...a/public/ui/dataset_selector/advanced_selector.tsx 0.00% 14 Missing ⚠️
...lic/application/view_components/canvas/top_nav.tsx 9.09% 10 Missing ⚠️
...plication/components/top_nav/get_top_nav_links.tsx 0.00% 6 Missing ⚠️
...ta/public/ui/dataset_selector/dataset_selector.tsx 44.44% 4 Missing and 1 partial ⚠️
.../data_explorer/public/components/sidebar/index.tsx 58.33% 4 Missing and 1 partial ⚠️
...rns/index_patterns/ensure_default_index_pattern.ts 25.00% 3 Missing ⚠️
...y_string/dataset_service/lib/index_pattern_type.ts 0.00% 3 Missing ⚠️
...ery/query_string/dataset_service/lib/index_type.ts 0.00% 3 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##              2.x    #8663      +/-   ##
==========================================
- Coverage   60.95%   60.89%   -0.06%     
==========================================
  Files        3786     3787       +1     
  Lines       90212    90316     +104     
  Branches    14126    14157      +31     
==========================================
+ Hits        54988    55000      +12     
- Misses      31758    31848      +90     
- Partials     3466     3468       +2     
Flag Coverage Δ
Linux_1 29.01% <4.87%> (-0.12%) ⬇️
Linux_2 56.53% <0.00%> (-0.01%) ⬇️
Linux_3 37.69% <17.64%> (-0.05%) ⬇️
Linux_4 29.91% <6.25%> (-0.12%) ⬇️
Windows_1 29.03% <4.87%> (-0.12%) ⬇️
Windows_2 56.48% <0.00%> (-0.01%) ⬇️
Windows_3 37.70% <17.64%> (-0.05%) ⬇️
Windows_4 29.91% <6.25%> (-0.12%) ⬇️

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.

Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

@AMoo-Miki AMoo-Miki merged commit 74a69d6 into opensearch-project:2.x Oct 19, 2024
68 of 71 checks passed
@AMoo-Miki
Copy link
Collaborator Author

Manually backported to 2.x with #8670

ashwin-pc added a commit to ashwin-pc/OpenSearch-Dashboards that referenced this pull request Oct 19, 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