Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsqadmin: Disambiguating Table Headings in Channels #184

Merged
merged 1 commit into from
Apr 25, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 78 additions & 66 deletions nsqadmin/templates/channel.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,78 +59,90 @@ <h4>Notice</h4> No producers exist for this topic/channel.
</div>

<div class="row-fluid"><div class="span12">
<h4>Channel Message Queue</h4>
<h4>Channel</h4>
<table class="table table-bordered table-condensed">
<tr>
<th>Host</th>
<th>Depth</th>
<th>Memory + Disk</th>
<th>In-Flight</th>
<th>Deferred</th>
<th>Requeued</th>
<th>Timed Out</th>
<th>Messages</th>
{{if $g.Enabled}}<th>Rate</th>{{end}}
<th>Connections</th>
</tr>
<thead>
<tr>
<th>&nbsp;</th>
<th colspan="4" class='text-center'>Message Queues</th>
{{if $g.Enabled}}
<th colspan="4" class='text-center'>Statistics</th>
{{else}}
<th colspan="5" class='text-center'>Statistics</th>
{{end}}
</tr>
<tr>
<th>Host</th>
<th>Depth</th>
<th>Memory + Disk</th>
<th>In-Flight</th>
<th>Deferred</th>
<th>Requeued</th>
<th>Timed Out</th>
<th>Messages</th>
{{if $g.Enabled}}<th>Rate</th>{{end}}
<th>Connections</th>
</tr>
</thead>
<tbody>

{{range $c := .ChannelStats.HostStats}}
<tr>
<td>{{$c.HostAddress}}{{if $c.Paused}} <span class="label label-important">paused</span>{{end}}</td>
<td>{{$c.Depth | commafy}}</td>
<td>{{$c.MemoryDepth | commafy}} + {{$c.BackendDepth | commafy}}</td>
<td>{{$c.InFlightCount | commafy}}</td>
<td>{{$c.DeferredCount | commafy}}</td>
<td>{{$c.RequeueCount | commafy}}</td>
<td>{{$c.TimeoutCount | commafy}}</td>
<td>{{$c.MessageCount | commafy}}</td>
{{if $g.Enabled}}<td class="bold rate" target="{{$g.Rate $c}}"></td> {{end}}
<td>{{$c.ClientCount}}</td>
</tr>
{{if $g.Enabled}}
<tr>
<td></td>
<td><a href="{{$g.LargeGraph $c "depth"}}"><img width="120" height="20" src="{{$g.Sparkline $c "depth"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "in_flight_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "in_flight_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "deferred_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "deferred_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "requeue_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "requeue_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "timeout_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "timeout_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "message_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "message_count"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "clients"}}"><img width="120" height="20" src="{{$g.Sparkline $c "clients"}}"></a></td>
</tr>
{{end}}
<tr>
<td>{{$c.HostAddress}}{{if $c.Paused}} <span class="label label-important">paused</span>{{end}}</td>
<td>{{$c.Depth | commafy}}</td>
<td>{{$c.MemoryDepth | commafy}} + {{$c.BackendDepth | commafy}}</td>
<td>{{$c.InFlightCount | commafy}}</td>
<td>{{$c.DeferredCount | commafy}}</td>
<td>{{$c.RequeueCount | commafy}}</td>
<td>{{$c.TimeoutCount | commafy}}</td>
<td>{{$c.MessageCount | commafy}}</td>
{{if $g.Enabled}}<td class="bold rate" target="{{$g.Rate $c}}"></td> {{end}}
<td>{{$c.ClientCount}}</td>
</tr>
{{if $g.Enabled}}
<tr>
<td></td>
<td><a href="{{$g.LargeGraph $c "depth"}}"><img width="120" height="20" src="{{$g.Sparkline $c "depth"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "in_flight_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "in_flight_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "deferred_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "deferred_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "requeue_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "requeue_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "timeout_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "timeout_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "message_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "message_count"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "clients"}}"><img width="120" height="20" src="{{$g.Sparkline $c "clients"}}"></a></td>
</tr>
{{end}}

{{ end }}
{{ with $c := .ChannelStats }}
<tr class="info">
<td>Total:</td>
<td>{{$c.Depth | commafy}}</td>
<td>{{$c.MemoryDepth | commafy}} + {{$c.BackendDepth | commafy}}</td>
<td>{{$c.InFlightCount | commafy}}</td>
<td>{{$c.DeferredCount | commafy}}</td>
<td>{{$c.RequeueCount | commafy}}</td>
<td>{{$c.TimeoutCount | commafy}}</td>
<td>{{$c.MessageCount | commafy}}</td>
{{if $g.Enabled}}<td class="bold rate" target="{{$g.Rate $c}}"></td> {{end}}
<td>{{$c.ClientCount}}</td>
</tr>
{{if $g.Enabled}}
<tr class="info">
<td></td>
<td><a href="{{$g.LargeGraph $c "depth"}}"><img width="120" height="20" src="{{$g.Sparkline $c "depth"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "in_flight_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "in_flight_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "deferred_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "deferred_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "requeue_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "requeue_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "timeout_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "timeout_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "message_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "message_count"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "clients"}}"><img width="120" height="20" src="{{$g.Sparkline $c "clients"}}"></a></td>
</tr>
{{end}}

<tr class="info">
<td>Total:</td>
<td>{{$c.Depth | commafy}}</td>
<td>{{$c.MemoryDepth | commafy}} + {{$c.BackendDepth | commafy}}</td>
<td>{{$c.InFlightCount | commafy}}</td>
<td>{{$c.DeferredCount | commafy}}</td>
<td>{{$c.RequeueCount | commafy}}</td>
<td>{{$c.TimeoutCount | commafy}}</td>
<td>{{$c.MessageCount | commafy}}</td>
{{if $g.Enabled}}<td class="bold rate" target="{{$g.Rate $c}}"></td> {{end}}
<td>{{$c.ClientCount}}</td>
</tr>
{{if $g.Enabled}}
<tr class="info">
<td></td>
<td><a href="{{$g.LargeGraph $c "depth"}}"><img width="120" height="20" src="{{$g.Sparkline $c "depth"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "in_flight_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "in_flight_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "deferred_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "deferred_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "requeue_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "requeue_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "timeout_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "timeout_count"}}"></a></td>
<td><a href="{{$g.LargeGraph $c "message_count"}}"><img width="120" height="20" src="{{$g.Sparkline $c "message_count"}}"></a></td>
<td></td>
<td><a href="{{$g.LargeGraph $c "clients"}}"><img width="120" height="20" src="{{$g.Sparkline $c "clients"}}"></a></td>
</tr>
{{end}}
</tbody>
{{ end }}
</table>
</div></div>
Expand Down