-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Uptime] Edit uptime alerts #68005
[Uptime] Edit uptime alerts #68005
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in testing alerts !!
@shahzad31 sorry to put you through another review, but I discovered another case where this wasn't behaving the way we want. I've committed significant code since your approval so we should verify that as well. |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!
* Extract store creation to plugin start, add redux providers to alert registration. * Update unit test. * Move alert registration to `setup` function. * Allow external editing of uptime client alert types. * Move alert initialization back to `start`. * Clean up interfaces for alert types. * Add code that will work for settings link even outside uptime app. * Create new atomic params type for status alerts. * Update executor params typing to support both alert params types. * Update snapshot for alert factory function. * Fix broken types and refresh snapshots. * Allow edits of filters for monitor alerts. * Support default parameter value for numTimes. * Support default parameter values for timerange. * Modify kuery bar to work for alert edits, fix some filter issues. * Clean up tests and fix types. * Fix types and add a test. * Add callout and validation handling for old alerts while editing. * Add a test for updated validation function. * Define window for overview filters fetch action. * Revert store initialization. * Make monitor counter function while editing alerts. * Refresh snapshot. * Move snapshot count in monitor status alert to callout. * Add new state for selected filters. * Add basic functional tests for uptime alert flyouts. * Fix broken types. * Update unit tests with mock provider. * Remove unneeded params from hook. * Add more unit tests. * Reducing functional test flakiness. * Alert flyout controls update url only within Uptime app. * Extract context interaction to container component, update snapshots. * Add missing parameter to test file. * Remove flaky functional test. Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Shahzad <[email protected]>
* Extract store creation to plugin start, add redux providers to alert registration. * Update unit test. * Move alert registration to `setup` function. * Allow external editing of uptime client alert types. * Move alert initialization back to `start`. * Clean up interfaces for alert types. * Add code that will work for settings link even outside uptime app. * Create new atomic params type for status alerts. * Update executor params typing to support both alert params types. * Update snapshot for alert factory function. * Fix broken types and refresh snapshots. * Allow edits of filters for monitor alerts. * Support default parameter value for numTimes. * Support default parameter values for timerange. * Modify kuery bar to work for alert edits, fix some filter issues. * Clean up tests and fix types. * Fix types and add a test. * Add callout and validation handling for old alerts while editing. * Add a test for updated validation function. * Define window for overview filters fetch action. * Revert store initialization. * Make monitor counter function while editing alerts. * Refresh snapshot. * Move snapshot count in monitor status alert to callout. * Add new state for selected filters. * Add basic functional tests for uptime alert flyouts. * Fix broken types. * Update unit tests with mock provider. * Remove unneeded params from hook. * Add more unit tests. * Reducing functional test flakiness. * Alert flyout controls update url only within Uptime app. * Extract context interaction to container component, update snapshots. * Add missing parameter to test file. * Remove flaky functional test. Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Shahzad <[email protected]> # Conflicts: # x-pack/plugins/uptime/public/lib/alert_types/monitor_status.tsx
* Extract store creation to plugin start, add redux providers to alert registration. * Update unit test. * Move alert registration to `setup` function. * Allow external editing of uptime client alert types. * Move alert initialization back to `start`. * Clean up interfaces for alert types. * Add code that will work for settings link even outside uptime app. * Create new atomic params type for status alerts. * Update executor params typing to support both alert params types. * Update snapshot for alert factory function. * Fix broken types and refresh snapshots. * Allow edits of filters for monitor alerts. * Support default parameter value for numTimes. * Support default parameter values for timerange. * Modify kuery bar to work for alert edits, fix some filter issues. * Clean up tests and fix types. * Fix types and add a test. * Add callout and validation handling for old alerts while editing. * Add a test for updated validation function. * Define window for overview filters fetch action. * Revert store initialization. * Make monitor counter function while editing alerts. * Refresh snapshot. * Move snapshot count in monitor status alert to callout. * Add new state for selected filters. * Add basic functional tests for uptime alert flyouts. * Fix broken types. * Update unit tests with mock provider. * Remove unneeded params from hook. * Add more unit tests. * Reducing functional test flakiness. * Alert flyout controls update url only within Uptime app. * Extract context interaction to container component, update snapshots. * Add missing parameter to test file. * Remove flaky functional test. Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Shahzad <[email protected]> # Conflicts: # x-pack/plugins/uptime/public/lib/alert_types/monitor_status.tsx Co-authored-by: Elastic Machine <[email protected]>
Backported to: |
* Extract store creation to plugin start, add redux providers to alert registration. * Update unit test. * Move alert registration to `setup` function. * Allow external editing of uptime client alert types. * Move alert initialization back to `start`. * Clean up interfaces for alert types. * Add code that will work for settings link even outside uptime app. * Create new atomic params type for status alerts. * Update executor params typing to support both alert params types. * Update snapshot for alert factory function. * Fix broken types and refresh snapshots. * Allow edits of filters for monitor alerts. * Support default parameter value for numTimes. * Support default parameter values for timerange. * Modify kuery bar to work for alert edits, fix some filter issues. * Clean up tests and fix types. * Fix types and add a test. * Add callout and validation handling for old alerts while editing. * Add a test for updated validation function. * Define window for overview filters fetch action. * Revert store initialization. * Make monitor counter function while editing alerts. * Refresh snapshot. * Move snapshot count in monitor status alert to callout. * Add new state for selected filters. * Add basic functional tests for uptime alert flyouts. * Fix broken types. * Update unit tests with mock provider. * Remove unneeded params from hook. * Add more unit tests. * Reducing functional test flakiness. * Alert flyout controls update url only within Uptime app. * Extract context interaction to container component, update snapshots. * Add missing parameter to test file. * Remove flaky functional test. Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Shahzad <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Shahzad <[email protected]>
Summary
Resolves elastic/uptime#179
Allows users to edit alerts they've previously created in the Uptime UI.
Something to note, old alerts will still work after this change, even though the underlying params have changed. I've added this callout to indicate to a user why some of their parameters aren't showing up:
Testing
There are a number of cases this PR seeks to cover, and the code is re-used in several different contexts, so it's important to thoroughly smoke test each case.
Creating an alert in Uptime
Creating an alert in the Management view
Editing an alert in the Management view
Editing old alerts
In all cases, add and remove filter values and searches to validate that these components behave as desired.
Checklist
Delete any items that are not applicable to this PR.
For maintainers