diff --git a/src/player.jsx b/src/player.jsx index 5287b81..374753a 100644 --- a/src/player.jsx +++ b/src/player.jsx @@ -947,7 +947,9 @@ export class Player extends React.Component { } /* Send packet ts to the top */ - this.props.onTsChange(this.pkt.pos); + if (this.props.logsEnabled) { + this.props.onTsChange(this.pkt.pos); + } this.setState({currentTsPost: parseInt(this.pkt.pos)}); /* Output the packet */ diff --git a/src/recordings.jsx b/src/recordings.jsx index 2bbb79a..f92a2e8 100644 --- a/src/recordings.jsx +++ b/src/recordings.jsx @@ -402,9 +402,11 @@ class Recording extends React.Component { this.goBackToList = this.goBackToList.bind(this); this.handleTsChange = this.handleTsChange.bind(this); this.handleLogTsChange = this.handleLogTsChange.bind(this); + this.handleLogsClick = this.handleLogsClick.bind(this); this.state = { curTs: null, logsTs: null, + logsEnabled: false, }; } @@ -416,6 +418,10 @@ class Recording extends React.Component { this.setState({logsTs: ts}); } + handleLogsClick() { + this.setState({logsEnabled: !this.state.logsEnabled}); + } + goBackToList() { if (cockpit.location.path[0]) { if ("search_rec" in cockpit.location.options) { @@ -439,7 +445,8 @@ class Recording extends React.Component { logsTs={this.logsTs} search={this.props.search} onTsChange={this.handleTsChange} - recording={r} />); + recording={r} + logsEnabled={this.state.logsEnabled} />); return ( @@ -451,16 +458,20 @@ class Recording extends React.Component {
  • {_("Session")}
  • + {player} - {player} - -
    - +
    + {this.state.logsEnabled === true && +
    +
    + +
    +
    + }
    );