Skip to content

Commit

Permalink
[streams] Add a 'no ongoing streams' mention when there are no streams
Browse files Browse the repository at this point in the history
  • Loading branch information
Radovan Zvoncek authored and rzvoncek committed Aug 16, 2018
1 parent 909895d commit 00cc0cc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ui/app/jsx/streams.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,21 @@ const Streams = React.createClass({
return;
}

const incomingStreams = this.state.streamSessions
let incomingStreams = this.state.streamSessions
.map(this._getIncomingStreams)
// concatenates streams from different sessions into one list
.reduce((sum, item) => sum.concat(item), [])
if (!incomingStreams || incomingStreams.length == 0 ) {
incomingStreams = (<tr><td>There are no incoming streams.</td></tr>)
}

const outgoingStreams = this.state.streamSessions
let outgoingStreams = this.state.streamSessions
.map(this._getOutgoingStreams)
// concatenates streams from different sessions into one list
.reduce((sum, item) => sum.concat(item), [])

if (!outgoingStreams || outgoingStreams.length == 0 ) {
outgoingStreams = (<tr><td>There are no outgoing streams.</td></tr>)
}

return (
<div>
Expand Down

0 comments on commit 00cc0cc

Please sign in to comment.