Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix: [Security:Rules:Detection Rules]Notify Bell button on installed
rules table on Detection rules(siem) page is missing accessible
discernible text
(#205336)](#205336)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-06T16:24:20Z","message":"fix:
[Security:Rules:Detection Rules]Notify Bell button on installed rules
table on Detection rules(siem) page is missing accessible discernible
text (#205336)\n\nCloses: #204483\r\n\r\nRelated to:
https://github.com/elastic/kibana/pull/188075\r\n\r\n## Description
\r\n\r\nA similar issue was already fixed
in\r\nhttps://github.com//pull/188075. To address #204483,
we\r\njust need to restore the name from the fetchRulesSnoozeSettings
request.\r\n\r\n## Screen\r\n\r\n<img width=\"1652\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/c3f6fcf6-6448-49cb-8e46-e840656417a6\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"eafa15bba6de05ac4d8071c9bf3c939f3833800b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","Team:
SecuritySolution","backport:prev-minor"],"title":"fix:
[Security:Rules:Detection Rules]Notify Bell button on installed rules
table on Detection rules(siem) page is missing accessible discernible
text","number":205336,"url":"https://github.com/elastic/kibana/pull/205336","mergeCommit":{"message":"fix:
[Security:Rules:Detection Rules]Notify Bell button on installed rules
table on Detection rules(siem) page is missing accessible discernible
text (#205336)\n\nCloses: #204483\r\n\r\nRelated to:
https://github.com/elastic/kibana/pull/188075\r\n\r\n## Description
\r\n\r\nA similar issue was already fixed
in\r\nhttps://github.com//pull/188075. To address #204483,
we\r\njust need to restore the name from the fetchRulesSnoozeSettings
request.\r\n\r\n## Screen\r\n\r\n<img width=\"1652\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/c3f6fcf6-6448-49cb-8e46-e840656417a6\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"eafa15bba6de05ac4d8071c9bf3c939f3833800b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205336","number":205336,"mergeCommit":{"message":"fix:
[Security:Rules:Detection Rules]Notify Bell button on installed rules
table on Detection rules(siem) page is missing accessible discernible
text (#205336)\n\nCloses: #204483\r\n\r\nRelated to:
https://github.com/elastic/kibana/pull/188075\r\n\r\n## Description
\r\n\r\nA similar issue was already fixed
in\r\nhttps://github.com//pull/188075. To address #204483,
we\r\njust need to restore the name from the fetchRulesSnoozeSettings
request.\r\n\r\n## Screen\r\n\r\n<img width=\"1652\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/c3f6fcf6-6448-49cb-8e46-e840656417a6\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"eafa15bba6de05ac4d8071c9bf3c939f3833800b"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <[email protected]>
  • Loading branch information
kibanamachine and alexwizp authored Jan 6, 2025
1 parent 0d28aed commit 5d70164
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 5d70164

Please sign in to comment.