Skip to content

Commit

Permalink
[ResponseOps][Stack Connectors] Add helptext for Opsgenie connector (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Nov 15, 2022
1 parent e957314 commit 73f1705
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const AdditionalOptions: React.FC<AdditionalOptionsProps> = ({
data-test-subj="opsgenie-source-row"
fullWidth
label={i18n.SOURCE_FIELD_LABEL}
helpText={i18n.OPSGENIE_SOURCE_HELP}
>
<TextFieldWithMessageVariables
index={index}
Expand All @@ -51,7 +52,12 @@ const AdditionalOptions: React.FC<AdditionalOptionsProps> = ({
</EuiFormRow>
</EuiFlexItem>
<EuiFlexItem>
<EuiFormRow data-test-subj="opsgenie-user-row" fullWidth label={i18n.USER_FIELD_LABEL}>
<EuiFormRow
data-test-subj="opsgenie-user-row"
fullWidth
label={i18n.USER_FIELD_LABEL}
helpText={i18n.OPSGENIE_USER_HELP}
>
<TextFieldWithMessageVariables
index={index}
editAction={editOptionalSubAction}
Expand Down Expand Up @@ -107,6 +113,7 @@ const CloseAlertComponent: React.FC<CloseAlertProps> = ({
error={errors['subActionParams.alias']}
isInvalid={isAliasInvalid}
label={i18n.ALIAS_REQUIRED_FIELD_LABEL}
helpText={i18n.OPSGENIE_ALIAS_HELP}
>
<TextFieldWithMessageVariables
index={index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const AdditionalOptionsComponent: React.FC<AdditionalOptionsProps> = ({
data-test-subj="opsgenie-entity-row"
fullWidth
label={i18n.ENTITY_FIELD_LABEL}
helpText={i18n.OPSGENIE_ENTITY_HELP}
>
<TextFieldWithMessageVariables
index={index}
Expand All @@ -50,6 +51,7 @@ const AdditionalOptionsComponent: React.FC<AdditionalOptionsProps> = ({
data-test-subj="opsgenie-source-row"
fullWidth
label={i18n.SOURCE_FIELD_LABEL}
helpText={i18n.OPSGENIE_SOURCE_HELP}
>
<TextFieldWithMessageVariables
index={index}
Expand All @@ -62,7 +64,12 @@ const AdditionalOptionsComponent: React.FC<AdditionalOptionsProps> = ({
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="m" />
<EuiFormRow data-test-subj="opsgenie-user-row" fullWidth label={i18n.USER_FIELD_LABEL}>
<EuiFormRow
data-test-subj="opsgenie-user-row"
fullWidth
label={i18n.USER_FIELD_LABEL}
helpText={i18n.OPSGENIE_USER_HELP}
>
<TextFieldWithMessageVariables
index={index}
editAction={editOptionalSubAction}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ const FormView: React.FC<FormViewProps> = ({
inputTargetValue={subActionParams?.description}
label={i18n.DESCRIPTION_FIELD_LABEL}
/>
<EuiFormRow data-test-subj="opsgenie-alias-row" fullWidth label={i18n.ALIAS_FIELD_LABEL}>
<EuiFormRow
data-test-subj="opsgenie-alias-row"
fullWidth
label={i18n.ALIAS_FIELD_LABEL}
helpText={i18n.OPSGENIE_ALIAS_HELP}
>
<TextFieldWithMessageVariables
index={index}
editAction={editOptionalSubAction}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ export const ENTITY_FIELD_LABEL = i18n.translate(
);

export const TAGS_HELP = i18n.translate('xpack.stackConnectors.components.opsgenie.tagsHelp', {
defaultMessage:
'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.',
defaultMessage: 'Press enter after each tag to begin a new one.',
});

export const TAGS_FIELD_LABEL = i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,31 @@ export const OPSGENIE_DOCUMENTATION = i18n.translate(
defaultMessage: 'Opsgenie documentation',
}
);

export const OPSGENIE_ALIAS_HELP = i18n.translate(
'xpack.stackConnectors.components.opsgenie.fieldAliasHelpText',
{
defaultMessage: 'The unique alert identifier used for de-deduplication in Opsgenie.',
}
);

export const OPSGENIE_ENTITY_HELP = i18n.translate(
'xpack.stackConnectors.components.opsgenie.fieldEntityHelpText',
{
defaultMessage: 'The domain of the alert. For example, the application name.',
}
);

export const OPSGENIE_SOURCE_HELP = i18n.translate(
'xpack.stackConnectors.components.opsgenie.fieldSourceHelpText',
{
defaultMessage: 'The display name for the source of the alert.',
}
);

export const OPSGENIE_USER_HELP = i18n.translate(
'xpack.stackConnectors.components.opsgenie.fieldUserHelpText',
{
defaultMessage: 'The display name for the owner.',
}
);

0 comments on commit 73f1705

Please sign in to comment.