Reapplies the #84123 PR:
This PR changes the default term from “Resolved” to “Recovered”, as it fits most use cases and we feel users are most likely to understand its meaning across domains.
This PR changes the default term from “Resolved” to “Recovered”, as it fits most use cases and we feel users are most likely to understand its meaning across domains.
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.
* Replaced AppContextProvider introduced by the plugin with KibanaContextProvider
* Removed unused files
* Fixed jest test
* Removed ActionsConnectorContext
* exposed addConnectorFlyout and editConnectorFlyouts as a plugin start result
* removed rest of unused connectors context
* fixed capabilities
* fixed jest tests
* fixed jest tests
* fixed jest tests
* fixed uptime
* fixed typecheck errors
* fixed typechecks
* fixed jest tests
* fixed type
* fixed uptime settings by pathing the correct plugin dependancy
* fixed security detection rules
* fixed due to commetns
* fixed jest tests
* fixed type check
* removed orig files
* fixed cases UI issues
* fixed due to comments
* fixed due to comments
* fixed kibana crash
* fixed es-lint
This PR wraps the components injected by Alert Type and Action in `EuiErrorBoundary` components, which ensures you can still edit the Alert and other Actions when these components fail.
* Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. Set default savedObjectId as {{alertInstanceId}} for ServiceNow, Resilient and Jira
* fixed comment
* fixed due to comments
* fixed doc
* fixed due to comments
This PR adds two components to aid in creating a uniform UI for specifying the conditions for Action Groups:
1. `AlertConditions`: A component that generates a container which renders custom component for each Action Group which has had its _conditions_ specified.
2. `AlertConditionsGroup`: A component that provides a unified container for the Action Group with its name and a button for resetting its condition.
This can be used by any Alert Type to easily create the UI for adding action groups with whichever UI is specific to their component.
resolves: https://github.com/elastic/kibana/issues/67389
Adds new variables to the existing set of variables that can be used in mustache templates to be used in action parameters when creating alerts.
- `alertActionGroup` - the action group associated with the alert scheduling actions
- `date` - the current date, in ISO format
* update deps
* update rules
use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead
* fix or mute all lint errors
* react-hooks eslint plugin fails on ? syntax
* fix wrong typings in viz
* remove React as a global type
* fix eslint errors
* update version to 4.8.1
* fix a new error
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.
OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`
Blocker to #72569
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This PR includes the following refactors:
1. Moves the Index Pattern Api from _Stack Alerts_ to the _Server_ plugin of _Trigger Actions UI_. This fixes a potential bug where a user could disable the _Stack Alerts_ plugin and inadvertently break the UI of the _ES Index _ action type.
2. Extracts the UI components for _Index Threshold_ and _Geo Threshold_ from the _Trigger Actions UI_ plugin and moves them into _Stack Alerts_.
* Update layout to rows for alert types
* Fix gutter usage
* Update heading, remove icons
* Non-working update to the combo box
* Add incorrect updates with questions to fix
* Fix combo box
* Cleanup changes to specific to this module
* fixed type checks and made combobox always visible
* Added groups by producer
* Added get producer name from kibana features names
* Added search bar with list of alert types
* Added search support functionality
* fixed links to alert type
* added alert type title
* Fixed failing tests
* Design updates to list
* Remove unsed items in import list
* fixed merge issue
* Fixed due to comments
* fixed tests
* Design fixes
Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
* resolves https://github.com/elastic/kibana/issues/78148
Adds a `defaultActionMessage` to the index threshold alert, so that the `message` parameter for actions will be pre-filled with a useful message
Adds a `RunsWhen` field to actions in the Alerts Flyout when creating / editing an Alert which allows the user to assign specific actions to a certain Action Groups
* Implemented Alerting health status pusher by using task manager and status pooler for Kibana status plugins 'kibanahost/api/status'
* Exposed health task registration to alerts plugin
* Fixed type error
* Extended health API endpoint with info about decryption failures, added correct health task implementation
* adjusted query
* Tested locally and got it working as expected, fixed tests and type check
* Added unit tests
* Changed AlertExecutionStatusErrorReasons to be enum
* Uppercase the enum
* Replaced string values to enum
* Fixed types
* Extended AlertsClient with getHealth method
* added return type to healthStatus$
* Added configurable health check interval and timestamps
* Extended update core status interval to 5mins
* Fixed failing tests
* Registered alerts config
* Fixed date for ok health state
* fixed jest test
* fixed task state
* Fixed due to comments, moved getHealth to a plugin level
* fixed type checks
* Added sorting to the latest Ok state last update
* adjusted error queries
* Fixed jest tests
* removed unused
* fixed type check
* Adding action group id to event log. Showing action group as part of status in alert details view
* Simplifying getting action group id
* Cleanup
* Adding unit tests
* Updating functional tests
* Updating test
* Fix types check
* Updating test
* PR fixes
* PR fixes
* Init connector
* Add test
* Improve comment type
* Add integration tests
* Fix i18n
* Improve tests
* Show unknown when username is null
* Improve comment type
* Pass connector to case client
* Improve type after PR #82125
* Add comment migration test
* Fix integration tests
* Fix reporter on table
* Create case connector ui
* Add connector to README
* Improve casting on executor
* Translate name
* Improve test
* Create comment type enum
* Fix type
* Fix i18n
* Move README to cases
* Filter out case connector from alerting
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
* wip
* wip
* Adding aggregation option to find function and using those results in UI
* Requesting aggregations from client instead of hard-coding in route
* alert_api test
* i18n fix
* Adding functional test
* Adding unit test for filters
* Splitting into two API endpoints
* Fixing test
* Fixing test
* Adding comment
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
We've had several bugs over the past few months due to flyouts retaining state between renders.
This ensure we remove these flyouts entirely in between usage to avoid such issues recurring.
* Adding hasAuth to server and client
* Adding migration and fixing tests
* Fixing test
* Adding spacing
* Adding functional test
* Fixing migration
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Added functional test for alerts list filters by status, alert type and action type. Did a code refactoring and splitting for alerts tests.
* -
* fixed failing tests
* fixed type checks
* minor naming fixes
* Adding hasAuth to server and client
* Adding migration and fixing tests
* Fixing test
* Adding spacing
* Adding functional test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* wip
* Adding health context provider and option to block waiting for health check
* Adding tests
* Removing forced lag
* Fixing action form not rendering pre selected action
* PR fixes
* Updating i18n ids
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
* Applying i18n fix
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>