-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cockpit-components-logs-panel: React-related fixes #9343
cockpit-components-logs-panel: React-related fixes #9343
Conversation
Looks ok to me (aside from inconsistent quoting, but this is not important), but this needs a rebase against current master. Thanks! |
1fa23f9
to
3e9afea
Compare
Rebased. Inconsistent quoting fixed. |
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.
Thanks!
return ( | ||
<div className="cockpit-logline" role="row"> | ||
<div className="cockpit-logline" role="row" key={key}> |
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.
As we've found out in other PRs, using objects as key apparently doesn't work.
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.
entry["__MONOTONIC_TIMESTAMP"]
will work
@@ -71,12 +73,12 @@ class JournalOutput { | |||
} | |||
|
|||
render_day_header(day) { | |||
return <div className="panel-heading">{day}</div>; | |||
return <div className="panel-heading" key="day-header">{day}</div>; |
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.
There might be more than one day header.
} | ||
|
||
render_reboot_separator() { | ||
return ( | ||
<div className="cockpit-logline" role="row"> | ||
<div className="cockpit-logline" role="row" key="reboot-sep"> |
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.
There might be more than one reboot separator
@@ -118,10 +120,13 @@ export class LogsPanel extends React.Component { | |||
}); | |||
} | |||
|
|||
componentDillUnmount() { | |||
componentWillUnmount() { |
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.
Ouch!
I pushed some proposed fixes. |
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
2328331
to
09e1283
Compare
I squashed the commits and force pushed. |
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.
Thanks for the cleanups! LGTM.
For some strange reason this causes ovirt build to fail:
|
Typo in React callback fixed. React array element keys added. A TODO for ongoing refactoring is added. Closes cockpit-project#9343
09e1283
to
1b0e8bd
Compare
I pushed a rebase, and the mysterious ovirt failure in semaphore is gone now (semaphore doesn't rebase, but our integration tests do). So this is good now, waiting for tests. |
Part of #9263 PR-split, see individual commits for more info.