elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.67k stars 8.11k forks source link

[ResponseOps][AlertsTable] Move the alerts table to a dedicated package #186556

Open cnasikas opened 2 months ago

cnasikas commented 2 months ago

NOTE: THIS ISSUE IS A DRAFT IN PROGRESS.

To prepare for the work described in https://github.com/elastic/response-ops-team/issues/190 we need to move the alerts table to each own package.

Blocked by https://github.com/elastic/kibana/issues/186448

### Tasks
- [ ] Create a package called `@kbn/response-ops-alerts-table` under the `package/response-ops` folder.
- [ ] Export only one `AlertsTable` component. Internally the component can be composed by multiple components.
- [ ] Remove the `useFetchAlerts` prop. Directly send the alerts as a prop as returned by React Query.
- [ ] Simplify the alerts table props (TBD).
- [ ] Remove configuration registry (TBD).
- [ ] Improve refresh queries API using react-query (see [comment](https://github.com/elastic/kibana/pull/186978#issuecomment-2236821925))
- [ ] Refactor alerts pagination reset logic (see [comment](https://github.com/elastic/kibana/pull/186978#discussion_r1680805765))
- [ ] Allow to customize pageSizeOptions and/or improve pageSize typing to match options union
- [ ] Connect `Updated ... ago` indicator `useSearchAlertsQuery`
elasticmachine commented 2 months ago

Pinging @elastic/response-ops (Team:ResponseOps)