diff --git a/src/recordings.jsx b/src/recordings.jsx index 8ef6d63..8b2d1bc 100644 --- a/src/recordings.jsx +++ b/src/recordings.jsx @@ -333,6 +333,17 @@ class Logs extends React.Component { this.getLogs(); } + componentDidMount() { + if (this.props.recording) { + if (this.start === null && this.end === null) { + this.end = this.props.recording.start + 3600; + this.start = this.props.recording.start; + this.earlier_than = this.props.recording.start; + } + this.getLogs(); + } + } + componentDidUpdate() { if (this.props.recording) { if (this.start === null && this.end === null) { @@ -341,15 +352,18 @@ class Logs extends React.Component { this.earlier_than = this.props.recording.start; } this.getLogs(); - if (this.props.curTs) { - const ts = this.props.curTs; - this.loadForTs(ts); - } + } + if (this.props.curTs) { + const ts = this.props.curTs; + this.loadForTs(ts); } } render() { - if (this.props.recording) { + let r = this.props.recording; + if (r == null) { + return Loading...; + } else { return (