Skip to content

Commit

Permalink
Hide the receiver sub table if no receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Apr 30, 2015
1 parent a2972e9 commit 7bbdc0a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ private[ui] class StreamingPage(parent: StreamingTab)
maxTime,
formattedUnit).toHtml(jsCollector)

val hasReceiver = listener.allReceivers.nonEmpty

val numCompletedBatches = listener.retainedCompletedBatches.size
val numActiveBatches = batchTimes.length - numCompletedBatches
val table =
Expand All @@ -334,7 +336,9 @@ private[ui] class StreamingPage(parent: StreamingTab)
<td style="vertical-align: middle;">
<div style="width: 160px;">
<div>
{if (hasReceiver) {
<span id="triangle" onclick={Unparsed(triangleJs)}>{Unparsed(BLACK_RIGHT_TRIANGLE_HTML)}</span>
}}
<strong>Input Rate</strong>
</div>
<div>Avg: {eventRateForAllReceivers.formattedAvg} events/sec</div>
Expand All @@ -343,11 +347,13 @@ private[ui] class StreamingPage(parent: StreamingTab)
<td class="timeline">{timelineDataForEventRateOfAllReceivers}</td>
<td class="histogram">{histogramDataForEventRateOfAllReceivers}</td>
</tr>
{if (hasReceiver) {
<tr id="inputs-table" style="display: none;" >
<td colspan="3">
{generateInputReceiversTable(jsCollector, minBatchTime, maxBatchTime, minEventRate, maxEventRate)}
{generateInputReceiversTable(jsCollector, minBatchTime, maxBatchTime, minEventRate, maxEventRate)}
</td>
</tr>
}}
<tr>
<td style="vertical-align: middle;">
<div style="width: 160px;">
Expand Down

0 comments on commit 7bbdc0a

Please sign in to comment.