-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ResponseOps][Alerts] Migrate alerts fetching to TanStack Query #186978
[ResponseOps][Alerts] Migrate alerts fetching to TanStack Query #186978
Conversation
/ci |
1 similar comment
/ci |
40a6699
to
6b5cd3e
Compare
/ci |
6b5cd3e
to
4941851
Compare
/ci |
4941851
to
bfb0008
Compare
/ci |
bfb0008
to
d3637e8
Compare
/ci |
d3637e8
to
a407466
Compare
/ci |
a407466
to
785ac43
Compare
/ci |
Pinging @elastic/response-ops (Team:ResponseOps) |
785ac43
to
1ca881e
Compare
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
Ok so it looks like the As for the The good news is this PR is useful to improve the "force refetch" functionality since we'll have tools like query's cc @cnasikas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks for addressing my feedback.
aafe764
to
4362489
Compare
I checked in edge-oblt, and you are right; when we have absolute time, the refresh button does not do anything, not sure if it is expected or not 🤔 (I will check how it works in other places and will create an issue if this needs to be fixed.)
Is my understanding correct that this will be fixed when the bulk action is migrated to react-query? Does it make sense to hide it if it does not show the correct information, or will it be fixed before the v8.16 release?
That would be awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Umbo and I checked the pagination issue, and it might be a feature :D I will double-check it with the Eui team.
Regarding Updated ... ago
, Umbo has it in his TODO list, and it sometimes does not work if the number of alerts does not change.
So overall, it LGTM! Thanks Umbo for doing this 🙌🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look great on behalf on @elastic/security-threat-hunting-investigations. I have desk tested below scenarios both on Alerts and Rule Details page. I have also asked a small question below regarding the failed test.
- Row Action
- Update Alert Status
- Add to Timeline.
- Bulk Actions
- Update Alert Status
- Field Browser
- Add Columns
- Remove Columns
- Refresh Button
- Filter/Query
- Adding a filter
- Adding a KQL Query
- Adding a Lucene Query
- Building block Filters.
- Inspect
- Run Time fields
Warning
I encountered and error once on the Rule Details Page but my mistake I navigated away and did not take the screenshot. Additionally I cannot reproduce it again but I will keep an eye.
...k/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts
Show resolved
Hide resolved
4362489
to
3d6857c
Compare
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
Summary
Implements a new
useSearchAlertsQuery
hook based on TanStack Query to replace theuseFetchAlerts
hook, following this organizational logic.This PR focuses mainly on the fetching logic itself, leaving the surrounding API surface mostly unchanged since it will be likely addressed in subsequent PRs.
To verify
Closes point 1 of #186448
Should fix #171738
Checklist