diff --git a/src/player.jsx b/src/player.jsx index 68bf5f5..a858765 100644 --- a/src/player.jsx +++ b/src/player.jsx @@ -974,6 +974,9 @@ export class Player extends React.Component { this.clearInputPlayer(); this.reset(); this.sync(); + if (this.props.logsEnabled) { + this.props.onRewindStart(); + } } fastForwardToEnd() { diff --git a/src/recordings.jsx b/src/recordings.jsx index f92a2e8..41a39c3 100644 --- a/src/recordings.jsx +++ b/src/recordings.jsx @@ -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 (