Skip to content

Commit

Permalink
Fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
salyh committed Mar 12, 2024
1 parent 8427a79 commit 7b51514
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/core/public/chrome/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
*/

export const OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK = 'https://forum.eliatra.com';
export const GITHUB_CREATE_ISSUE_LINK = 'https://github.com/eliatra-opensearch-enterprise-distro/OpenSearch-Dashboards/issues/new';
export const GITHUB_CREATE_ISSUE_LINK =
'https://github.com/eliatra-opensearch-enterprise-distro/OpenSearch-Dashboards/issues/new';
4 changes: 3 additions & 1 deletion src/core/public/chrome/ui/header/header_help_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ class HeaderHelpMenuUI extends Component<Props, State> {
}

createGithubUrl = (labels: string[], title?: string) => {
const url = new URL('https://github.com/eliatra-opensearch-enterprise-distro/OpenSearch-Dashboards/issues/new?');
const url = new URL(
'https://github.com/eliatra-opensearch-enterprise-distro/OpenSearch-Dashboards/issues/new?'
);

if (labels.length) {
url.searchParams.set('labels', labels.join(','));
Expand Down
16 changes: 12 additions & 4 deletions src/core/public/doc_links/doc_links_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ describe('DocLinksService#start()', () => {
const service = new DocLinksService();
const api = service.start({ injectedMetadata });
expect(api.DOC_LINK_VERSION).toEqual('test-branch');
expect(api.links.opensearchDashboards.introduction).toEqual('https://eliatra.com/docs/test-branch/dashboards/index/');
expect(api.links.opensearchDashboards.introduction).toEqual(
'https://eliatra.com/docs/test-branch/dashboards/index/'
);
});

it('templates the doc links with the main branch from injectedMetadata', () => {
Expand All @@ -47,7 +49,9 @@ describe('DocLinksService#start()', () => {
const service = new DocLinksService();
const api = service.start({ injectedMetadata });
expect(api.DOC_LINK_VERSION).toEqual('latest');
expect(api.links.opensearchDashboards.introduction).toEqual('https://eliatra.com/docs/latest/dashboards/index/');
expect(api.links.opensearchDashboards.introduction).toEqual(
'https://eliatra.com/docs/latest/dashboards/index/'
);
});

it('templates the doc links with the release branch from injectedMetadata', () => {
Expand All @@ -56,7 +60,9 @@ describe('DocLinksService#start()', () => {
const service = new DocLinksService();
const api = service.start({ injectedMetadata });
expect(api.DOC_LINK_VERSION).toEqual('1.1');
expect(api.links.opensearchDashboards.introduction).toEqual('https://eliatra.com/docs/1.1/dashboards/index/');
expect(api.links.opensearchDashboards.introduction).toEqual(
'https://eliatra.com/docs/1.1/dashboards/index/'
);
});

it('templates the doc links with the build version from injectedMetadata', () => {
Expand All @@ -66,6 +72,8 @@ describe('DocLinksService#start()', () => {
const service = new DocLinksService();
const api = service.start({ injectedMetadata });
expect(api.DOC_LINK_VERSION).toEqual('1.1');
expect(api.links.opensearchDashboards.introduction).toEqual('https://eliatra.com/docs/1.1/dashboards/index/');
expect(api.links.opensearchDashboards.introduction).toEqual(
'https://eliatra.com/docs/1.1/dashboards/index/'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports[`EmptyState should render normally 1`] = `
Object {
"description": <EuiLink
external={true}
href="https://opensearch.org/docs/mocked-test-branch"
href="https://eliatra.com/docs/mocked-test-branch"
target="_blank"
>
<FormattedMessage
Expand Down

0 comments on commit 7b51514

Please sign in to comment.