Skip to content

Commit

Permalink
[Docs] Fix documentation link for date math (#3207) (#3289)
Browse files Browse the repository at this point in the history
- Add new documentation link
- move from `noDocumentation` to `opensearch`

fixes #2849

Signed-off-by: Josh Romero <rmerqg@amazon.com>
(cherry picked from commit 11b98ec)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Signed-off-by: Josh Romero <rmerqg@amazon.com>
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>
  • Loading branch information
1 parent ae25d6e commit da552c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ export class DocLinksService {
close: `${OPENSEARCH_VERSIONED_DOCS}rest-api/index-apis/close-index/`,
},
},
// https://opensearch.org/docs/latest/opensearch/supported-field-types/date/#date-math
dateMath: `${OPENSEARCH_VERSIONED_DOCS}supported-field-types/date/#date-math`,
},
opensearchDashboards: {
// https://opensearch.org/docs/latest/dashboards/index/
Expand Down Expand Up @@ -386,6 +388,7 @@ export class DocLinksService {
// https://opensearch.org/docs/latest/dashboards/dql/#nested-field-query
nested_query: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dql/#nested-field-query`,
},
// https://opensearch.org/docs/latest/dashboards/browser-compatibility
browser: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}browser-compatibility`,
},
noDocumentation: {
Expand Down Expand Up @@ -425,7 +428,6 @@ export class DocLinksService {
},
addData: `${OPENSEARCH_WEBSITE_DOCS}`,
vega: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}`,
dateMath: `${OPENSEARCH_WEBSITE_DOCS}`,
savedObject: {
manageSavedObject: `https://opensearch.org/docs/latest/guide/en/kibana/current/managing-saved-objects.html#_export`,
},
Expand Down Expand Up @@ -718,6 +720,7 @@ export interface DocLinksStart {
readonly close: string;
};
};
readonly dateMath: string;
};
readonly opensearchDashboards: {
readonly introduction: string;
Expand Down Expand Up @@ -777,7 +780,6 @@ export interface DocLinksStart {
readonly visualize: Record<string, string>;
readonly addData: string;
readonly vega: string;
readonly dateMath: string;
readonly savedObject: {
readonly manageSavedObject: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function DateRangesParamEditor({
<EuiFormRow display={'rowCompressed'} fullWidth>
<>
<EuiText size="xs">
<EuiLink href={services.docLinks.links.noDocumentation.dateMath} target="_blank">
<EuiLink href={services.docLinks.links.opensearch.dateMath} target="_blank">
<FormattedMessage
id="visDefaultEditor.controls.dateRanges.acceptedDateFormatsLinkText"
defaultMessage="Acceptable date formats"
Expand Down

0 comments on commit da552c5

Please sign in to comment.