Alerting: Add more context to delete modals (#69244)

This commit is contained in:
Gilles De Mey 2023-05-31 11:47:17 +02:00 committed by GitHub
parent 7e924e0d74
commit deb13ef611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -154,7 +154,15 @@ export const RuleActionsButtons = ({ rule, rulesSource }: Props) => {
<ConfirmModal
isOpen={true}
title="Delete rule"
body="Deleting this rule will permanently remove it from your alert rule list. Are you sure you want to delete this rule?"
body={
<div>
<p>
Deleting &quot;<strong>{ruleToDelete.name}</strong>&quot; will permanently remove it from your alert
rule list.
</p>
<p>Are you sure you want to delete this rule?</p>
</div>
}
confirmText="Yes, delete"
icon="exclamation-triangle"
onConfirm={deleteRule}

View File

@ -261,11 +261,11 @@ export const RulesGroup = React.memo(({ group, namespace, expandAll, viewMode }:
title="Delete group"
body={
<div>
Deleting this group will permanently remove the group
<br />
and {group.rules.length} alert {pluralize('rule', group.rules.length)} belonging to it.
<br />
Are you sure you want to delete this group?
<p>
Deleting &quot;<strong>{group.name}</strong>&quot; will permanently remove the group and{' '}
{group.rules.length} alert {pluralize('rule', group.rules.length)} belonging to it.
</p>
<p>Are you sure you want to delete this group?</p>
</div>
}
onConfirm={deleteGroup}