-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] DF Analytics jobs list: persist pagination through refresh interval #75996
[ML] DF Analytics jobs list: persist pagination through refresh interval #75996
Conversation
Pinging @elastic/ml-ui (:ml) |
DataFrameAnalyticsListRow, | ||
} from '../analytics_list/common'; | ||
|
||
export function filterAnalytics( |
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.
it'd be better to move search server-side
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.
This search is just filtering the jobs that have already been loaded in response to what's being typed into the search bar. Could you explain a bit more about what you mean? I'm not sure how moving it to the server-side would benefit.
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.
Since you are replacing the in-memory table, it would be better to fetch only an active page instead of a complete list of jobs. Hence the kibana endpoint can receive from
, size
and query
params to fetch the list from ES
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.
Oh you're talking about for the pagination itself. I'm not sure it's actually doing anything for us unless the user has a ton of jobs. This behavior is also consistent with anomaly detection jobs - which arguably users right now have many more of. I don't think this would be in the scope of this PR but if we do see any performance indicators once this is in, happy to change it.
6b6e24f
to
0123f74
Compare
...a_frame_analytics/pages/analytics_management/components/analytics_list/use_table_settings.ts
Outdated
Show resolved
Hide resolved
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.
Tested latest edits and LGTM.
I noted that the table on the Overview page still uses EuiInMemoryTable
so at some point we might want to migrate that too, so that page number is retained there too.
dd6d64d
to
9a4bad7
Compare
9a4bad7
to
e9187c9
Compare
This has been updated with the fix for the edit issue @pheyos found 🙏 Ready for a final look when you get a chance cc @peteharverson, @walterra, @dimitris-athanasiou |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
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.
Tested latest edits and LGTM
…val (elastic#75996) * wip: switch analyticsList inMemoryTable to basic and implement search bar * move basicTable settings to custom hook and update types * update types * add types for empty prompt * ensure sorting works * add refresh to analytics management list * ensure table still updates editing job
…val (#75996) (#76503) * wip: switch analyticsList inMemoryTable to basic and implement search bar * move basicTable settings to custom hook and update types * update types * add types for empty prompt * ensure sorting works * add refresh to analytics management list * ensure table still updates editing job
Summary
Related issue #75828
Persists pagination for analytics jobs list. The functionality is now consistent with anomaly detection jobs list.
This PR
switches the EuiInMemoryTable used in the analytics list to the EuiBasicTable in order to be able to externally control pagination
creates a
useTableSettings
custom hook to control pagination/sort for the basic tableadds a SearchBar component which handles filtering of the table
Adds 'Refresh' button to Analytics list in kibana management (to be consistent with anomaly detection)
NOTE
Models list will be updated in a follow up to keep the PR's a reasonable size.
EUI NOTES
I created an issue requesting the ability to set pageIndex and pageSize externally for the InMemoryTable as we're now having to add this workaround in the anomaly detections jobs list, analytics list, models list, and transforms list. elastic/eui#3982
An additional meta issue tracking all the places we can switch back to using EuiInMemoryTable once the requested update is in will be added here as well. #76339
Checklist