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)

* Redirect Sample data link to the page in the same workspace

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* Changeset file for PR #8330 created/updated

* Optimize the code

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* Update unit test

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* Update unit test

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* Update unit test

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* update snapshot

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

---------

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 9369f37 commit 81cab73
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 81cab73

Please sign in to comment.