-
Notifications
You must be signed in to change notification settings - Fork 916
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] Redirect "Sample data" link to the page in the same workspace #8330
[Workspace] Redirect "Sample data" link to the page in the same workspace #8330
Conversation
Signed-off-by: Kapian1234 <[email protected]>
@@ -60,11 +62,9 @@ export const getNoItemsMessage = ( | |||
values={{ | |||
sampleDataInstallLink: ( | |||
<EuiLink | |||
onClick={() => | |||
application.navigateToApp('home', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about call application.navigationToApp('import_sample_data')
directly? Then we won't need so much modifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I didn't know that. It's a much better way to do that, thanks!
Signed-off-by: Kapian1234 <[email protected]>
…nSearch-Dashboards into sample_data_link_redirect
Signed-off-by: Kapian1234 <[email protected]>
Signed-off-by: Kapian1234 <[email protected]>
import { Observable } from 'rxjs'; | ||
import { RecursiveReadonly } from '@osd/utility-types'; | ||
import { EuiLink } from '@elastic/eui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Seems these import changes are not necessary, prefer to keep the original code.
Signed-off-by: Kapian1234 <[email protected]>
@Kapian1234 Can we post a record on 2 scenarios:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8330 +/- ##
==========================================
- Coverage 64.14% 60.92% -3.22%
==========================================
Files 3743 3750 +7
Lines 88836 89055 +219
Branches 13852 13910 +58
==========================================
- Hits 56981 54260 -2721
- Misses 31240 31432 +192
- Partials 615 3363 +2748
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ok |
@Kapian1234 snapshot test failed, please take a look. |
ok |
But it runs successfully on my local |
Running this failed on my local
|
Signed-off-by: Kapian1234 <[email protected]>
…pace (#8330) * Redirect Sample data link to the page in the same workspace Signed-off-by: Kapian1234 <[email protected]> * Changeset file for PR #8330 created/updated * Optimize the code Signed-off-by: Kapian1234 <[email protected]> * Update unit test Signed-off-by: Kapian1234 <[email protected]> * Update unit test Signed-off-by: Kapian1234 <[email protected]> * Update unit test Signed-off-by: Kapian1234 <[email protected]> * update snapshot Signed-off-by: Kapian1234 <[email protected]> --------- Signed-off-by: Kapian1234 <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 81cab73) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…pace (#8330) (#8385) * Redirect Sample data link to the page in the same workspace * Changeset file for PR #8330 created/updated * Optimize the code * Update unit test * Update unit test * Update unit test * update snapshot --------- (cherry picked from commit 81cab73) Signed-off-by: Kapian1234 <[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>
…pace (opensearch-project#8330) (opensearch-project#8385) * Redirect Sample data link to the page in the same workspace * Changeset file for PR opensearch-project#8330 created/updated * Optimize the code * Update unit test * Update unit test * Update unit test * update snapshot --------- (cherry picked from commit 81cab73) Signed-off-by: Kapian1234 <[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>
Description
Redirect "Sample data" link to the page in the same workspace
Issues Resolved
Screenshot
workspace enabled
Screen.Recording.2024-09-29.at.17.17.55.mov
workspace disabled
Screen.Recording.2024-09-29.at.17.18.27.mov
Testing the changes
yarn test:jest src/plugins/dashboard/public/application/utils/get_no_items_message.test.tsx
Changelog
Check List
yarn test:jest
yarn test:jest_integration