Skip to content

Commit

Permalink
fix: [Security:Rules:Detection Rules]Notify Bell button on installed …
Browse files Browse the repository at this point in the history
…rules table on Detection rules(siem) page is missing accessible discernible text (elastic#205336)

Closes: elastic#204483

Related to: elastic#188075

## Description

A similar issue was already fixed in
elastic#188075. To address elastic#204483, we
just need to restore the name from the fetchRulesSnoozeSettings request.

## Screen

<img width="1652" alt="image"
src="https://github.com/user-attachments/assets/c3f6fcf6-6448-49cb-8e46-e840656417a6"
/>

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit eafa15b)
  • Loading branch information
alexwizp committed Jan 6, 2025
1 parent b44cff1 commit 4575c96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ describe('Detections Rules API', () => {
expect(fetchMock).toHaveBeenCalledWith(
expect.any(String),
expect.objectContaining({
body: '{"filter":"alert.id:\\"alert:id1\\" or alert.id:\\"alert:id2\\"","fields":"[\\"muteAll\\",\\"activeSnoozes\\",\\"isSnoozedUntil\\",\\"snoozeSchedule\\"]","per_page":2}',
body: '{"filter":"alert.id:\\"alert:id1\\" or alert.id:\\"alert:id2\\"","fields":"[\\"name\\",\\"muteAll\\",\\"activeSnoozes\\",\\"isSnoozedUntil\\",\\"snoozeSchedule\\"]","per_page":2}',
})
);
});
Expand All @@ -865,7 +865,7 @@ describe('Detections Rules API', () => {
expect(fetchMock).toHaveBeenCalledWith(
expect.any(String),
expect.objectContaining({
body: '{"filter":"alert.id:\\"alert:id1\\" or alert.id:\\"alert:id2\\"","fields":"[\\"muteAll\\",\\"activeSnoozes\\",\\"isSnoozedUntil\\",\\"snoozeSchedule\\"]","per_page":2}',
body: '{"filter":"alert.id:\\"alert:id1\\" or alert.id:\\"alert:id2\\"","fields":"[\\"name\\",\\"muteAll\\",\\"activeSnoozes\\",\\"isSnoozedUntil\\",\\"snoozeSchedule\\"]","per_page":2}',
})
);
});
Expand All @@ -876,7 +876,7 @@ describe('Detections Rules API', () => {
expect(fetchMock).toHaveBeenCalledWith(
expect.any(String),
expect.objectContaining({
body: '{"filter":"alert.id:\\"alert:id1\\" or alert.id:\\"alert:id2\\"","fields":"[\\"muteAll\\",\\"activeSnoozes\\",\\"isSnoozedUntil\\",\\"snoozeSchedule\\"]","per_page":2}',
body: '{"filter":"alert.id:\\"alert:id1\\" or alert.id:\\"alert:id2\\"","fields":"[\\"name\\",\\"muteAll\\",\\"activeSnoozes\\",\\"isSnoozedUntil\\",\\"snoozeSchedule\\"]","per_page":2}',
})
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,13 @@ export const fetchRulesSnoozeSettings = async ({
method: 'POST',
body: JSON.stringify({
filter: ids.map((x) => `alert.id:"alert:${x}"`).join(' or '),
fields: JSON.stringify(['muteAll', 'activeSnoozes', 'isSnoozedUntil', 'snoozeSchedule']),
fields: JSON.stringify([
'name',
'muteAll',
'activeSnoozes',
'isSnoozedUntil',
'snoozeSchedule',
]),
per_page: ids.length,
}),
signal,
Expand Down

0 comments on commit 4575c96

Please sign in to comment.