You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [Alerting] fixes buggy default message behaviour (#84202)
This PR addresses some weird UX we've identified with default values in Action Params components and their inferred defaults when placed inside of an Alerts flyout.
Key changes:
1. Typing of these components has been corrected to reflect that we expect these parameters to only be _partial_, as the form is used to set these values (for example, the `message` field of the Server Log action, might or might not be set, so it should be nullable, but in the typing we treated it as the _final_ valid state, which is message not being nullable).
2. When a default message is set by the params components, the are tracked against the value of the default, which means that if the default changes, then so will the value in the field. Custom values provided by the user will not be overridden when the default changes. This has to be handled by the component itself at the moment (hopefully in the future we can make this a concern of the flyout and not each component).
3. The concept of the "Recovered" action group has been removed from these components - that's an Alerting concern, not actions, and shouldn't appear in the action components' code.
# Conflicts:
# x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/server_log/server_log_params.test.tsx
* Update server_log_params.test.tsx
Removed unused var (caused by bad merge)
Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/email/email_params.test.tsx
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/email/email_params.tsx
+9-8
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ import { ActionParamsProps } from '../../../../types';
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/search_issues.tsx
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ import { useGetSingleIssue } from './use_get_single_issue';
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/use_get_fields_by_issue_type.tsx
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/use_get_single_issue.tsx
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/server_log/server_log_params.test.tsx
+91-8
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ import { ServerLogLevelOptions } from '.././types';
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/server_log/server_log_params.tsx
+11-11
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,12 @@
3
3
* or more contributor license agreements. Licensed under the Elastic License;
4
4
* you may not use this file except in compliance with the Elastic License.
Copy file name to clipboardexpand all lines: x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/slack/slack_params.tsx
+10-9
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,11 @@
3
3
* or more contributor license agreements. Licensed under the Elastic License;
4
4
* you may not use this file except in compliance with the Elastic License.
0 commit comments