Reset Logs View on Player Rewind
This commit is contained in:
parent
046a1d4cb1
commit
f2e5bc2903
2 changed files with 12 additions and 1 deletions
|
|
@ -974,6 +974,9 @@ export class Player extends React.Component {
|
|||
this.clearInputPlayer();
|
||||
this.reset();
|
||||
this.sync();
|
||||
if (this.props.logsEnabled) {
|
||||
this.props.onRewindStart();
|
||||
}
|
||||
}
|
||||
|
||||
fastForwardToEnd() {
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ class Recording extends React.Component {
|
|||
this.handleTsChange = this.handleTsChange.bind(this);
|
||||
this.handleLogTsChange = this.handleLogTsChange.bind(this);
|
||||
this.handleLogsClick = this.handleLogsClick.bind(this);
|
||||
this.handleLogsReset = this.handleLogsReset.bind(this);
|
||||
this.state = {
|
||||
curTs: null,
|
||||
logsTs: null,
|
||||
|
|
@ -422,6 +423,12 @@ class Recording extends React.Component {
|
|||
this.setState({logsEnabled: !this.state.logsEnabled});
|
||||
}
|
||||
|
||||
handleLogsReset() {
|
||||
this.setState({logsEnabled: false}, () => {
|
||||
this.setState({logsEnabled: true});
|
||||
});
|
||||
}
|
||||
|
||||
goBackToList() {
|
||||
if (cockpit.location.path[0]) {
|
||||
if ("search_rec" in cockpit.location.options) {
|
||||
|
|
@ -446,7 +453,8 @@ class Recording extends React.Component {
|
|||
search={this.props.search}
|
||||
onTsChange={this.handleTsChange}
|
||||
recording={r}
|
||||
logsEnabled={this.state.logsEnabled} />);
|
||||
logsEnabled={this.state.logsEnabled}
|
||||
onRewindStart={this.handleLogsReset} />);
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue