Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added help text where needed on connectors and alert actions UI #69601

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
710c890
Added help text where needed on connectors and alert actions UI
YulNaumenko Jun 18, 2020
520d9db
Merge remote-tracking branch 'upstream/master' into alerting-ui-actio…
YulNaumenko Jun 22, 2020
4c7fa92
Merge remote-tracking branch 'upstream/master' into alerting-ui-actio…
YulNaumenko Jun 23, 2020
f709dda
fixed ui form
YulNaumenko Jun 23, 2020
3742a8e
Merge upstream
YulNaumenko Jun 23, 2020
7023a26
Merge remote-tracking branch 'upstream/master' into alerting-ui-actio…
YulNaumenko Jun 26, 2020
7874318
Added index action type examples, fixed slack link
YulNaumenko Jun 27, 2020
3555e71
Merge master
YulNaumenko Jul 8, 2020
d38ae8c
Fixed email connector docs and links
YulNaumenko Jul 9, 2020
b7197c2
Additional cleanup on email
YulNaumenko Jul 9, 2020
54a9371
Removed autofocus to avoid twice link click for opening in the new page
YulNaumenko Jul 9, 2020
78c3683
Extended documentation for es index action type
YulNaumenko Jul 9, 2020
76b129f
Fixed tests
YulNaumenko Jul 9, 2020
3cf6705
Fixed doc link
YulNaumenko Jul 9, 2020
a5b5628
Merge remote-tracking branch 'upstream/master' into alerting-ui-actio…
YulNaumenko Jul 13, 2020
316cc7b
fixed due to comments
YulNaumenko Jul 13, 2020
1f4e13e
fixed due to comments
YulNaumenko Jul 13, 2020
7f11a48
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
b0a28f5
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
ce97972
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
4d8fa7d
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
12a0364
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
817a476
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
0ae05ae
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
39f15d1
Update x-pack/plugins/actions/README.md
YulNaumenko Jul 13, 2020
0ac7dc1
Update x-pack/plugins/actions/README.md
YulNaumenko Jul 13, 2020
15c4b37
Update x-pack/plugins/triggers_actions_ui/README.md
YulNaumenko Jul 13, 2020
c87ea4e
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
4a1feb3
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
3c2dd52
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
3191843
Update docs/user/alerting/action-types/email.asciidoc
YulNaumenko Jul 13, 2020
bed176e
Update docs/user/alerting/action-types/index.asciidoc
YulNaumenko Jul 13, 2020
59681ef
Update docs/user/alerting/action-types/slack.asciidoc
YulNaumenko Jul 13, 2020
50e613d
Fixed due to comments
YulNaumenko Jul 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions x-pack/plugins/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,23 +426,22 @@ The config and params properties are modelled after the [Watcher Index Action](h

### `config`

| Property | Description | Type |
| -------- | -------------------------------------- | ------------------- |
| index | The Elasticsearch index to index into. | string _(optional)_ |
| Property | Description | Type |
| -------------------- | ---------------------------------------------------------- | -------------------- |
| index | The Elasticsearch index to index into. | string _(optional)_ |
| doc_id | The optional \_id of the document. | string _(optional)_ |
| execution_time_field | The field that will store/index the action execution time. | string _(optional)_ |
| refresh | Setting of the refresh policy for the write request | boolean _(optional)_ |
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved

### `secrets`

This action type has no `secrets` properties.

### `params`

| Property | Description | Type |
| -------------------- | ---------------------------------------------------------- | -------------------- |
| index | The Elasticsearch index to index into. | string _(optional)_ |
| doc_id | The optional \_id of the document. | string _(optional)_ |
| execution_time_field | The field that will store/index the action execution time. | string _(optional)_ |
| refresh | Setting of the refresh policy for the write request | boolean _(optional)_ |
| body | The documument body/bodies to index. | object or object[] |
| Property | Description | Type |
| --------- | ---------------------------------------- | ------------------- |
| documents | JSON object which describe the [document](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index.html#getting-started-batch-processing). | object[] |
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved

---

Expand Down
17 changes: 15 additions & 2 deletions x-pack/plugins/triggers_actions_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -900,10 +900,23 @@ export function getActionType(): ActionTypeModel {

![Index connector card](https://i.imgur.com/fflsmu5.png)

![Index connector form](https://i.imgur.com/tbgyvAL.png)
![Index connector form](https://i.imgur.com/IkixGMV.png)

and action params form available in Create Alert form:
![Index action form](https://i.imgur.com/VsWMLeU.png)
![Index action form](https://i.imgur.com/mpxnPOF.png)

Example of the index document for Index Threshold Alert:
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved

```
{
"alert_id": "{{alertId}}",
"alert_name": "{{alertName}}",
"alert_instance_id": "{{alertInstanceId}}",
"context_title": "{{context.title}}",
"context_value": "{{context.value}}",
"context_message": "{{context.message}}"
}
```

### Webhook

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import {
EuiFieldPassword,
EuiSwitch,
EuiFormRow,
EuiSpacer,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { EuiLink } from '@elastic/eui';
import { ActionConnectorFieldsProps } from '../../../../types';
import { EmailActionConnector } from '../types';

Expand Down Expand Up @@ -195,6 +197,43 @@ export const EmailActionConnectorFields: React.FunctionComponent<ActionConnector
</EuiFormRow>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="m" />
<EuiLink target="_blank" href={'https://support.google.com/a/answer/176600?hl=en'} external>
{i18n.translate(
'xpack.triggersActionsUI.sections.builtinActionTypes.emailAction.helpGmailLink',
{
defaultMessage: 'How to configure Gmail',
}
)}
</EuiLink>
<EuiSpacer size="m" />
<EuiLink
target="_blank"
href={
'https://support.microsoft.com/en-us/office/pop-and-imap-email-settings-for-outlook-8361e398-8af4-4e97-b147-6c6c4ac95353?ui=en-us&rs=en-us&ad=us'
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved
}
external
>
{i18n.translate(
'xpack.triggersActionsUI.sections.builtinActionTypes.emailAction.helpOutlookLink',
{
defaultMessage: 'How to configure Outlook',
}
)}
</EuiLink>
<EuiSpacer size="m" />
<EuiLink
target="_blank"
href={'https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html'}
external
>
{i18n.translate(
'xpack.triggersActionsUI.sections.builtinActionTypes.emailAction.helpAmazonLink',
{
defaultMessage: 'How to configure the Amazon SES SMTP Endpoint',
}
)}
</EuiLink>
</Fragment>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
EuiSelect,
EuiTitle,
EuiIconTip,
EuiLink,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
Expand All @@ -28,7 +29,7 @@ import {

const IndexActionConnectorFields: React.FunctionComponent<ActionConnectorFieldsProps<
EsIndexActionConnector
>> = ({ action, editActionConfig, errors, http }) => {
>> = ({ action, editActionConfig, errors, http, docLinks }) => {
const { index, refresh, executionTimeField } = action.config;
const [hasTimeFieldCheckbox, setTimeFieldCheckboxState] = useState<boolean>(
executionTimeField != null
Expand Down Expand Up @@ -186,9 +187,9 @@ const IndexActionConnectorFields: React.FunctionComponent<ActionConnectorFieldsP
</>
}
/>
<EuiSpacer size="m" />
{hasTimeFieldCheckbox ? (
<>
<EuiSpacer size="m" />
<EuiFormRow
id="executionTimeField"
fullWidth
Expand Down Expand Up @@ -217,6 +218,32 @@ const IndexActionConnectorFields: React.FunctionComponent<ActionConnectorFieldsP
</EuiFormRow>
</>
) : null}
<EuiSpacer size="m" />
<EuiLink
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved
target="_blank"
href={'https://github.com/elastic/kibana/tree/master/x-pack/plugins/actions#index'}
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved
external
>
{i18n.translate(
'xpack.triggersActionsUI.sections.builtinActionTypes.indexAction.helpConfigureIndexLink',
{
defaultMessage: 'How to configure Index connector README',
}
)}
</EuiLink>
<EuiSpacer size="m" />
<EuiLink
target="_blank"
href={`${docLinks.ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${docLinks.DOC_LINK_VERSION}/getting-started-index.html#getting-started-batch-processing`}
YulNaumenko marked this conversation as resolved.
Show resolved Hide resolved
external
>
{i18n.translate(
'xpack.triggersActionsUI.sections.builtinActionTypes.indexAction.helpIndexDocLink',
{
defaultMessage: 'How to index some documents',
}
)}
</EuiLink>
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import React, { Fragment } from 'react';
import { EuiFormRow, EuiCodeEditor } from '@elastic/eui';
import { EuiFormRow, EuiCodeEditor, EuiSpacer, EuiLink } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { useXJsonMode } from '../../../../../../../../src/plugins/es_ui_shared/static/ace_x_json/hooks';
import { ActionParamsProps } from '../../../../types';
Expand Down Expand Up @@ -73,6 +73,21 @@ export const IndexParamsFields = ({
}}
/>
</EuiFormRow>
<EuiSpacer size="m" />
<EuiLink
target="_blank"
href={
'https://github.com/elastic/kibana/tree/master/x-pack/plugins/triggers_actions_ui#index'
}
external
>
{i18n.translate(
'xpack.triggersActionsUI.sections.builtinActionTypes.indexActionParams.helpIndexDocLink',
{
defaultMessage: 'Example of indexed document',
}
)}
</EuiLink>
</Fragment>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const SlackActionFields: React.FunctionComponent<ActionConnectorFieldsProps<
fullWidth
helpText={
<EuiLink
href="https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-slack.html#configuring-slack"
href={`${docLinks.ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${docLinks.DOC_LINK_VERSION}/actions-slack.html#configuring-slack`}
target="_blank"
>
<FormattedMessage
Expand Down