Skip to content

Commit 301d9ca

Browse files
authored
fix: disabling alert from overview page doesn't work (#8640)
1 parent f350b0e commit 301d9ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/src/pages/AlertDetails/AlertHeader/ActionButtons/ActionButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function AlertActionButtons({
111111
return (
112112
<>
113113
<div className="alert-action-buttons">
114-
<Tooltip title={alertRuleState ? 'Enable alert' : 'Disable alert'}>
114+
<Tooltip title={isAlertRuleDisabled ? 'Enable alert' : 'Disable alert'}>
115115
{isAlertRuleDisabled !== undefined && (
116116
<Switch
117117
size="small"

frontend/src/pages/AlertDetails/hooks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export const useAlertRuleStatusToggle = ({
394394
{
395395
onSuccess: (data) => {
396396
setAlertRuleState(data?.payload?.state);
397-
397+
queryClient.refetchQueries([REACT_QUERY_KEY.ALERT_RULE_DETAILS, ruleId]);
398398
notifications.success({
399399
message: `Alert has been ${
400400
data?.payload?.state === 'disabled' ? 'disabled' : 'enabled'

0 commit comments

Comments
 (0)