-
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] Add button for refreshing job list without full page refresh. #24084
[ML] Add button for refreshing job list without full page refresh. #24084
Conversation
Pinging @elastic/ml-ui |
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.
Code changes LGTM, but looking at the screenshot, is it possible to vertically align the text in the Refresh button with the text in the 'Create New Job' button? I wonder if it would look better if the text was aligned across those two buttons?
Just a question about the general structure of the code: Since we have the button for a new job as a separate component |
@peteharverson - great catch! Fixed that and updated the screenshot. 👍 |
Good one, @walterra - I was just thinking that would make it super easy to test, too 👍 I'll go ahead and do that |
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.
Aligned buttons LGTM!
return ( | ||
<React.Fragment> | ||
<JobStatsBar | ||
setUpdateJobStats={this.setUpdateJobStats} |
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.
couldn't the JobStatsBar
now receive the whole jobsSummaryList
as a prop and then update itself whenever it changes?
It would remove the need for setUpdateJobStats
and unsetUpdateJobStats
and make the code a lot simpler.
JobStatsBar
could then call createJobStats
in getDerivedStateFromProps
and create the job stats
/> | ||
<div className="job-management"> | ||
<NodeAvailableWarning /> | ||
<header> |
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.
nit, to keep this cleaner, could this whole header be moved to a component that takes in onRefreshClick
and isRefreshing
?
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.
I thought about that but I think it's probably okay to keep each of them separate (the node warning, new button, and refresh button) since they don't share anything and each of them can be tested on their own. 🤔
💔 Build Failed |
💔 Build Failed |
@walterra, @jgowdyelastic - updated from the comments! Would really appreciate if you could take one last look. Thanks! 😄 |
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
💔 Build Failed |
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 💯
retest |
💔 Build Failed |
5064783
to
63efcca
Compare
💚 Build Succeeded |
…lastic#24084) * Add refresh button for job list * Show load icon while refreshing * Move view build logic to jobsListView * Align job action buttons in ui * Extract RefreshJobsListButton component * update jobStatsBar to take list as prop
Summary
Related issue: #17983
New:
Add
Refresh
button (next toCreate New Job
) that will refresh job list without a full page refresh.Refactor:
Keep
jobs.js
as a simple display component to pass to the jobsPage directive.Now,
jobs_list_view.js
pulls inJobStatsBar
,NodeAvailableWarning
, and the addedEuiButtonEmpty
Refresh button.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsFor maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature additition or change that requires a release note and was labeled appropriately