Skip to content

Commit

Permalink
Fix dashboards documentation and DQL links, expand help menu width so…
Browse files Browse the repository at this point in the history
… label isn't truncated

Signed-off-by: Tommy Markley <markleyt@amazon.com>
  • Loading branch information
Tommy Markley committed May 26, 2021
1 parent 6e0a760 commit 5bfc5cb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/core/public/chrome/ui/header/header_help_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export type ChromeHelpExtensionMenuDocumentationLink = EuiButtonEmptyProps & {
linkType: 'documentation';
/**
* URL to documentation page.
* i.e. `${OPENSEARARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/${appName}.html`,
* i.e. `${OPENSEARCH_DOCS}${appName}`,
*/
href: string;
};
Expand Down Expand Up @@ -365,7 +365,7 @@ class HeaderHelpMenuUI extends Component<Props, State> {
</EuiFlexGroup>
</EuiPopoverTitle>

<div style={{ maxWidth: 240 }}>
<div style={{ maxWidth: 270 }}>
{defaultContent}
{defaultContent && customContent && <EuiHorizontalRule margin="m" />}
{customContent}
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/doc_links/doc_links_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('DocLinksService#start()', () => {
const api = service.start({ injectedMetadata });
expect(api.DOC_LINK_VERSION).toEqual('test-branch');
expect(api.links.opensearchDashboards).toEqual(
'https://www.opensearch.org/guide/en/kibana/test-branch/index.html'
'https://docs-beta.opensearch.org/docs/opensearch-dashboards/'
);
});
});
9 changes: 5 additions & 4 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export class DocLinksService {
public start({ injectedMetadata }: StartDeps): DocLinksStart {
const DOC_LINK_VERSION = injectedMetadata.getOpenSearchDashboardsBranch();
const OPENSEARCH_WEBSITE_URL = 'https://www.opensearch.org/';
const OPENSEARCH_DOCS = `${OPENSEARCH_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`;
const OPENSEARCH_DOCS = `https://docs-beta.opensearch.org/docs/opensearch/`;
const OPENSEARCH_DASHBOARDS_DOCS = `https://docs-beta.opensearch.org/docs/opensearch-dashboards/`;

return deepFreeze({
DOC_LINK_VERSION,
Expand Down Expand Up @@ -126,16 +127,16 @@ export class DocLinksService {
introduction: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-patterns.html`,
},
addData: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`,
opensearchDashboards: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`,
opensearchDashboards: `${OPENSEARCH_DASHBOARDS_DOCS}`,
siem: {
guide: `${OPENSEARCH_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/index.html`,
gettingStarted: `${OPENSEARCH_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/index.html`,
},
query: {
eql: `${OPENSEARCH_DOCS}eql.html`,
luceneQuerySyntax: `${OPENSEARCH_DOCS}query-dsl-query-string-query.html#query-string-syntax`,
queryDsl: `${OPENSEARCH_DOCS}query-dsl.html`,
kueryQuerySyntax: `${OPENSEARCH_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`,
queryDsl: `${OPENSEARCH_DOCS}query-dsl`,
kueryQuerySyntax: `${OPENSEARCH_DOCS}query-dsl`,
},
date: {
dateMath: `${OPENSEARCH_DOCS}common-options.html#date-math`,
Expand Down

0 comments on commit 5bfc5cb

Please sign in to comment.