Skip to content

Commit

Permalink
Updated rollup help text. (opensearch-project#220)
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
  • Loading branch information
AWSHurneyt committed Aug 5, 2022
1 parent 23ce514 commit 4821889
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React, { Component, Fragment } from "react";
import { EuiSpacer, EuiFormRow, EuiComboBox, EuiCallOut } from "@elastic/eui";
import { EuiSpacer, EuiFormRow, EuiComboBox, EuiCallOut, EuiText, EuiLink } from "@elastic/eui";
import { EuiComboBoxOptionOption } from "@elastic/eui/src/components/combo_box/types";
import _ from "lodash";
import { ContentPanel } from "../../../../components/ContentPanel";
Expand All @@ -30,6 +30,8 @@ interface RollupIndicesState {
targetIndexOptions: { label: string; value?: IndexItem }[];
}

export const ROLLUP_RESULTS_HELP_TEXT_LINK = "https://opensearch.org/docs/latest/im-plugin/index-rollups/index/#step-1-set-up-indices";

export default class RollupIndices extends Component<RollupIndicesProps, RollupIndicesState> {
static contextType = CoreServicesContext;
constructor(props: RollupIndicesProps) {
Expand Down Expand Up @@ -143,7 +145,18 @@ export default class RollupIndices extends Component<RollupIndicesProps, RollupI
label="Target index"
error={targetIndexError}
isInvalid={targetIndexError != ""}
helpText="The index stores rollup results. You can look up or an existing index to reuse or type to create a new index."
helpText={
<EuiText size={"xs"}>
{
"The target index stores rollup results. You can select an existing index or type in a new index name with embedded variables "
}
{
<EuiLink external href={ROLLUP_RESULTS_HELP_TEXT_LINK} target={"_blank"}>
Learn more
</EuiLink>
}
</EuiText>
}
>
<EuiComboBox
placeholder="Select or create target index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,25 @@ exports[`<CreateRollupForm /> spec renders the component 1`] = `
class="euiFormHelpText euiFormRow__text"
id="some_html_id-help-0"
>
The index stores rollup results. You can look up or an existing index to reuse or type to create a new index.
<div
class="euiText euiText--extraSmall"
>
The target index stores rollup results. You can select an existing index or type in a new index name with embedded variables
<a
class="euiLink euiLink--primary"
href="https://opensearch.org/docs/latest/im-plugin/index-rollups/index/#step-1-set-up-indices"
rel="noopener noreferrer"
target="_blank"
>
Learn more
EuiIconMock
<span
class="euiScreenReaderOnly"
>
(opens in a new tab or window)
</span>
</a>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 4821889

Please sign in to comment.