-
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
[Alerting] Prompt for confirmation when saving alert with no action #79892
Conversation
…re/save-alert-no-action
…re/save-alert-no-action
…ing/save-alert-no-action
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
...ck/plugins/triggers_actions_ui/public/application/sections/alert_form/confirm_alert_save.tsx
Outdated
Show resolved
Hide resolved
x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
Outdated
Show resolved
Hide resolved
x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
Outdated
Show resolved
Hide resolved
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.
Code LGTM. I left a few comments about the e2e test, but the rest looks awesome and works as expected 👍 . I will rely on @gchaps decision about the text for the confirmation modal.
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.
Works as expected so LGTM 👍
Worth considering the comments on the e2e tests but no blockers as far as I'm concerned. :)
...ck/plugins/triggers_actions_ui/public/application/sections/alert_form/confirm_alert_save.tsx
Outdated
Show resolved
Hide resolved
x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
Outdated
Show resolved
Hide resolved
|
||
it('can save alert', async () => { | ||
await alerts.clickSaveAlertButton(); | ||
await alerts.clickSaveAlertsConfirmButton(); | ||
await pageObjects.common.closeToast(); | ||
}); | ||
|
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.
It might be worth pinging the Uptime team just so they know about the changes to their tests.
I don't think they will get pinged automatically because we own the test suite.
Pinging @elastic/uptime (Team:uptime) |
I noticed this oddity, when I did a save with the "index" prompter open, and then pressed the save button which was enabled at the time. I wasn't even trying it, I think I fat-fingered enter there or something :-) Seems like this is unrelated to this PR, it feels like that "index" prompter should be dismissed upon attempted Save, or Save should be disabled until the "index" prompter is dismissed. I think we have some other issues regarding these "expression" prompters, specifically around when they are dismissed, perhaps such scenarios are already being addressed in the expression editor bits. I'd kinda hate to even make a z-order change, just for this, as it feels like that could be brittle over time. before hitting save after hitting save |
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, works as expected when creating a new alert.
I did notice this doesn't prompt when editing an existing alert. I think that's fine, but ... dunno. We're certainly looking at catching the "you didn't add any actions" upon create. And if for some reason, you had a reason to have an action-less alert, and got that prompter every time you saved it, it would be frustrating.
Agreed. I thought about adding it to the Edit flyout as well but I wasn't sure what the expected behavior should be when editing. |
Should I make a separate ticket to address this? |
I don't think that we should be prompted again in Edit, because it is something with what user have already agreed on and saved before. So +1 to left it as it is now. |
Ya, I think so. |
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
History
To update your PR or re-run it, just comment with: |
…lastic#79892) * Adding save confirmation for new alerts with no associated actions * Adding functional tests * Fixing uptime alert test * Fixing uptime alert test * PR fixes * Updating confirmation modal wording Co-authored-by: Kibana Machine <[email protected]>
…79892) (#80314) * Adding save confirmation for new alerts with no associated actions * Adding functional tests * Fixing uptime alert test * Fixing uptime alert test * PR fixes * Updating confirmation modal wording Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Resolves #61522
Summary
When saving an alert, show confirmation modal if user is trying to save an alert with no actions. This will only occur for users with the ability to create actions. Users who don't have the ability to create actions will not be prompted.
Checklist
Delete any items that are not applicable to this PR.