Skip to content

Commit

Permalink
[Workspace] Redirect "Sample data" link to the page in the same works…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent 53112de commit c89a872
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8330.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Redirect sample data link to the page in the same workspace ([#8330](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8330))
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('dashboard listing table with no item', () => {

expect(component).toMatchSnapshot();
component.find(EuiLink).simulate('click');
expect(application.navigateToApp).toHaveBeenCalledTimes(1);

expect(application.navigateToApp).toHaveBeenCalledWith('import_sample_data');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ export const getNoItemsMessage = (
defaultMessage="New to OpenSearch Dashboards? {sampleDataInstallLink} to take a test drive."
values={{
sampleDataInstallLink: (
<EuiLink
onClick={() =>
application.navigateToApp('home', {
path: '#/tutorial_directory/sampleData',
})
}
>
<EuiLink onClick={() => application.navigateToApp('import_sample_data')}>
<FormattedMessage
id="dashboard.listing.createNewDashboard.sampleDataInstallLinkText"
defaultMessage="Install some sample data"
Expand Down

0 comments on commit c89a872

Please sign in to comment.