Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.17] [Security Solution] Adds callback
onUpdatePageIndex
to get c…
…urrent `pageIndex` in Unified Data table (#201240) (#202348) # Backport This will backport the following commits from `main` to `8.17`: - [[Security Solution] Adds callback `onUpdatePageIndex` to get current `pageIndex` in Unified Data table (#201240)](#201240) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jatin Kathuria","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-29T15:14:27Z","message":"[Security Solution] Adds callback `onUpdatePageIndex` to get current `pageIndex` in Unified Data table (#201240)\n\n## Summary\n\nHandles resolution for\n- Notes fetching data for all Timeline Records which leads to\nperformance issues.\n- #201330 \n\n## Issue - Notes fetching data for all Timeline Records \n\nCurrently, there was no way for consumer of `UnifiedDataGrid` to get the\ncurrent `pageIndex`. Security Solution needs to get the current\n`pageIndex` so the items on the current page can be calculated.\n\n@elastic/kibana-data-discovery , please let us know if you have any\nopinion here.\n\nThis results in notes being fetched for all Timeline Records which means\nminimum of 500 records and if user has queries 5000 records ( for\nexample ), a request will be made to query notes for all those 5000\nnotes which leads to performance issue and sometimes error as shown\nbelow:\n\n\n![image](https://github.com/user-attachments/assets/6fcfe05d-340c-4dcb-a273-5af53ed12945)\n\n\n## 👨💻 Changes\n\nThis adds attribute `pageIndex` to timeline state. \n\n```javascript\n{\n \"pageIndex\": number\n}\n```\n`pageIndex` helps with getting the events for that particular page.\n\n## 🟡 Caveat\n\n- Currently this `pageIndex` is shared between Query and EQL tabs which\ncan lead to wonky behavior at time.\n- Additionally, as of now table maintains its own page index and\nconsumer component cannot effect the `pageIndex` of the UnifiedDataGrid.","sha":"de9d5465df5900936991d79306cb2cbbe63f4623","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","v9.0.0","Team:Threat Hunting:Investigations","v8.16.2"],"number":201240,"url":"https://github.com/elastic/kibana/pull/201240","mergeCommit":{"message":"[Security Solution] Adds callback `onUpdatePageIndex` to get current `pageIndex` in Unified Data table (#201240)\n\n## Summary\n\nHandles resolution for\n- Notes fetching data for all Timeline Records which leads to\nperformance issues.\n- #201330 \n\n## Issue - Notes fetching data for all Timeline Records \n\nCurrently, there was no way for consumer of `UnifiedDataGrid` to get the\ncurrent `pageIndex`. Security Solution needs to get the current\n`pageIndex` so the items on the current page can be calculated.\n\n@elastic/kibana-data-discovery , please let us know if you have any\nopinion here.\n\nThis results in notes being fetched for all Timeline Records which means\nminimum of 500 records and if user has queries 5000 records ( for\nexample ), a request will be made to query notes for all those 5000\nnotes which leads to performance issue and sometimes error as shown\nbelow:\n\n\n![image](https://github.com/user-attachments/assets/6fcfe05d-340c-4dcb-a273-5af53ed12945)\n\n\n## 👨💻 Changes\n\nThis adds attribute `pageIndex` to timeline state. \n\n```javascript\n{\n \"pageIndex\": number\n}\n```\n`pageIndex` helps with getting the events for that particular page.\n\n## 🟡 Caveat\n\n- Currently this `pageIndex` is shared between Query and EQL tabs which\ncan lead to wonky behavior at time.\n- Additionally, as of now table maintains its own page index and\nconsumer component cannot effect the `pageIndex` of the UnifiedDataGrid.","sha":"de9d5465df5900936991d79306cb2cbbe63f4623"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201240","number":201240,"mergeCommit":{"message":"[Security Solution] Adds callback `onUpdatePageIndex` to get current `pageIndex` in Unified Data table (#201240)\n\n## Summary\n\nHandles resolution for\n- Notes fetching data for all Timeline Records which leads to\nperformance issues.\n- #201330 \n\n## Issue - Notes fetching data for all Timeline Records \n\nCurrently, there was no way for consumer of `UnifiedDataGrid` to get the\ncurrent `pageIndex`. Security Solution needs to get the current\n`pageIndex` so the items on the current page can be calculated.\n\n@elastic/kibana-data-discovery , please let us know if you have any\nopinion here.\n\nThis results in notes being fetched for all Timeline Records which means\nminimum of 500 records and if user has queries 5000 records ( for\nexample ), a request will be made to query notes for all those 5000\nnotes which leads to performance issue and sometimes error as shown\nbelow:\n\n\n![image](https://github.com/user-attachments/assets/6fcfe05d-340c-4dcb-a273-5af53ed12945)\n\n\n## 👨💻 Changes\n\nThis adds attribute `pageIndex` to timeline state. \n\n```javascript\n{\n \"pageIndex\": number\n}\n```\n`pageIndex` helps with getting the events for that particular page.\n\n## 🟡 Caveat\n\n- Currently this `pageIndex` is shared between Query and EQL tabs which\ncan lead to wonky behavior at time.\n- Additionally, as of now table maintains its own page index and\nconsumer component cannot effect the `pageIndex` of the UnifiedDataGrid.","sha":"de9d5465df5900936991d79306cb2cbbe63f4623"}},{"branch":"8.16","label":"v8.16.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
- Loading branch information