[8.17] [Cloud Security][Bug] Fix for Page Crashing (#203028) (#203143)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Cloud Security][Bug] Fix for Page Crashing
(#203028)](https://github.com/elastic/kibana/pull/203028)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Rickyanto
Ang","email":"rickyangwyn@gmail.com"},"sourceCommit":{"committedDate":"2024-12-05T14:35:42Z","message":"[Cloud
Security][Bug] Fix for Page Crashing (#203028)\n\n## Summary\r\n\r\nThis
PR is for quick fix to address issue with Page crashing when
user\r\nclicks on user name or host name on preview flyout for Alerts
Contextual\r\nFlyout","sha":"06b774e78886bf914cc51a2d99497427a8c2a9e6","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","backport:version","v8.17.0"],"number":203028,"url":"https://github.com/elastic/kibana/pull/203028","mergeCommit":{"message":"[Cloud
Security][Bug] Fix for Page Crashing (#203028)\n\n## Summary\r\n\r\nThis
PR is for quick fix to address issue with Page crashing when
user\r\nclicks on user name or host name on preview flyout for Alerts
Contextual\r\nFlyout","sha":"06b774e78886bf914cc51a2d99497427a8c2a9e6"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203028","number":203028,"mergeCommit":{"message":"[Cloud
Security][Bug] Fix for Page Crashing (#203028)\n\n## Summary\r\n\r\nThis
PR is for quick fix to address issue with Page crashing when
user\r\nclicks on user name or host name on preview flyout for Alerts
Contextual\r\nFlyout","sha":"06b774e78886bf914cc51a2d99497427a8c2a9e6"}},{"branch":"8.17","label":"v8.17.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"url":"https://github.com/elastic/kibana/pull/203135","number":203135,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Rickyanto Ang 2024-12-05 11:21:14 -08:00 committed by GitHub
parent f25fa79cf1
commit 60e56a2e8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,9 @@ export const EntityInsight = <T,>({
const { items: alertsData } = useAlertsByStatus({
entityFilter,
signalIndexName,
queryId: DETECTION_RESPONSE_ALERTS_BY_STATUS_ID,
queryId: isPreviewMode
? `${DETECTION_RESPONSE_ALERTS_BY_STATUS_ID}ALERTS_PREVIEW_TRUE`
: `${DETECTION_RESPONSE_ALERTS_BY_STATUS_ID}ALERTS_PREVIEW_FALSE`,
to,
from,
});