node.hbs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. {{> warning}}
  2. {{> error}}
  3. <ol class="breadcrumb">
  4. <li><a class="link" href="{{basePath "/nodes"}}">消息服务实例</a>
  5. <li class="active">{{name}}</li>
  6. </ol>
  7. {{#if graph_active}}
  8. <div class="row">
  9. <div class="col-md-8 col-md-offset-2">
  10. <table class="table muted">
  11. <tr>
  12. <td>
  13. <a href="{{large_graph "node" node "" "" "*_bytes"}}"><img class="img-polaroid" width="200" src="{{large_graph "node" node "" "" "*_bytes"}}"/></a>
  14. <h5 style="text-align: center;">GC Pressure</h5>
  15. </td>
  16. <td>
  17. <a href="{{large_graph "node" node "" "" "gc_pause_*"}}"><img class="img-polaroid" width="200" src="{{large_graph "node" node "" "" "gc_pause_*"}}"/></a>
  18. <h5 style="text-align: center;">GC Pause Percentiles</h5>
  19. </td>
  20. <td>
  21. <a href="{{large_graph "node" node "" "" "gc_runs"}}"><img class="img-polaroid" width="200" src="{{large_graph "node" node "" "" "gc_runs"}}"/></a>
  22. <h5 style="text-align: center;">GC Runs</h5>
  23. </td>
  24. <td>
  25. <a href="{{large_graph "node" node "" "" "heap_objects"}}"><img class="img-polaroid" width="200" src="{{large_graph "node" node "" "" "heap_objects"}}"/></a>
  26. <h5 style="text-align: center;">Heap Objects In-Use</h5>
  27. </td>
  28. </tr>
  29. </table>
  30. </div>
  31. </div>
  32. {{/if}}
  33. <div class="row">
  34. <div class="col-md-12">
  35. {{#unless topics.length}}
  36. <div class="alert alert-warning">
  37. <h4>注意</h4> 该消息服务实例上没有主题
  38. </div>
  39. {{else}}
  40. <table class="table table-condensed">
  41. <tr>
  42. <td colspan="2"><strong>{{../topics.length}}</strong> 主题</td>
  43. <td colspan="7"></td>
  44. <td><strong>{{commafy total_messages}}</strong> 消息</td>
  45. <td><strong>{{commafy total_clients}}</strong> 客户端</td>
  46. </tr>
  47. {{#each topics}}
  48. <tr>
  49. <th colspan="3">主题</th>
  50. <th>队列</th>
  51. <th>内存 + 硬盘</th>
  52. <th colspan="4"></th>
  53. <th>消息</th>
  54. <th>通道</th>
  55. </tr>
  56. <tr class="info">
  57. <td colspan="3">
  58. <button class="btn-link red tombstone-link" data-node="{{../name}}" data-topic="{{topic_name}}" style="padding: 0 6px; border: 0;">✘</button> {{topic_name}}
  59. </td>
  60. <td>
  61. {{#if ../graph_active}}<a href="{{large_graph "topic" node name "" "depth"}}"><img width="120" src="{{sparkline "topic" node topic_name "" "depth"}}"></a>{{/if}}
  62. {{commafy depth}}
  63. </td>
  64. <td>{{commafy memory_depth}} + {{commafy backend_depth}}</td>
  65. <td colspan="4"></td>
  66. <td>
  67. {{#if ../graph_active}}<a href="{{large_graph "topic" node topic_name "" "message_count"}}"><img width="120" src="{{sparkline "topic" node topic_name "" "message_count"}}"></a>{{/if}}
  68. {{commafy message_count}}
  69. </td>
  70. <td>{{commafy channels.length}}</td>
  71. </tr>
  72. {{#unless channels.length}}
  73. <tr>
  74. <td colspan="11">
  75. <div class="alert alert-warning"><h4>注意</h4> 该主题没有订阅通道.</div>
  76. </td>
  77. </tr>
  78. {{else}}
  79. {{#each channels}}
  80. <tr>
  81. <th width="25"></th>
  82. <th colspan="2">通道</th>
  83. <th>队列</th>
  84. <th>内存 + 磁盘</th>
  85. <th>处理中</th>
  86. <th>推迟</th>
  87. <th>重入</th>
  88. <th>超时</th>
  89. <th>消息</th>
  90. <th>连接</th>
  91. </tr>
  92. <tr class="warning">
  93. <td></td>
  94. <td colspan="2">
  95. {{channel_name}}
  96. {{#if paused}}<span class="label label-primary">paused</span>{{/if}}
  97. </td>
  98. <td>
  99. {{#if ../../../graph_active}}<a href="{{large_graph "channel" node topic_name channel_name "depth"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "depth"}}"></a>{{/if}}
  100. {{commafy depth}}
  101. </td>
  102. <td>{{commafy memory_depth}} + {{commafy backend_depth}}</td>
  103. <td>{{commafy in_flight_count}}</td>
  104. <td>{{commafy deferred_count}}</td>
  105. <td>{{commafy requeue_count}}</td>
  106. <td>{{commafy timeout_count}}</td>
  107. <td>{{commafy message_count}}</td>
  108. <td>
  109. {{#if ../../../graph_active}}<a href="{{large_graph "channel" node topic_name channel_name "clients"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "clients"}}"></a>{{/if}}
  110. {{commafy clients.length}}
  111. </td>
  112. </tr>
  113. {{#unless clients.length}}
  114. <tr>
  115. <td colspan="11">
  116. <div class="alert alert-warning"><h4>Notice</h4>No clients connected to this channel.</div>
  117. </td>
  118. </tr>
  119. {{else}}
  120. <tr>
  121. <th></th>
  122. <th>客户端主机</th>
  123. <th>客户端</th>
  124. <th></th>
  125. <th>属性</th>
  126. <th>处理中</th>
  127. <th>就绪</th>
  128. <th>重入</th>
  129. <th>结束</th>
  130. <th>消息</th>
  131. <th>连接</th>
  132. </tr>
  133. {{#each clients}}
  134. <tr>
  135. <td></td>
  136. <td title="{{remote_address}}">{{hostname}}{{#if show_client_id}} ({{client_id}}){{/if}}</td>
  137. <td>{{#if user_agent.length}}<small>{{user_agent}}</small>{{/if}}</td>
  138. <td></td>
  139. <td>
  140. {{#if sample_rate}}
  141. <span class="label label-info">采样 {{sample_rate}}%</span>
  142. {{/if}}
  143. {{#if tls}}
  144. <span class="label label-warning" {{#if tls_version}}title="{{tls_version}} {{tls_cipher_suite}} {{tls_negotiated_protocol}} mutual:{{tls_negotiated_protocol_is_mutual}}"{{/if}}>TLS</span>
  145. {{/if}}
  146. {{#if deflate}}
  147. <span class="label label-default">Deflate</span>
  148. {{/if}}
  149. {{#if snappy}}
  150. <span class="label label-primary">Snappy</span>
  151. {{/if}}
  152. {{#if authed}}
  153. <span class="label label-success">
  154. {{#if auth_identity_url}}<a href="{{auth_identity_url}}">{{/if}}
  155. <span class="glyphicon glyphicon-user white" title="Authed{{#if auth_identity}} Identity:{{auth_identity}}{{/if}}"></span>
  156. {{#if auth_identity_url}}</a>{{/if}}
  157. </span>
  158. {{/if}}
  159. </td>
  160. <td>{{commafy in_flight_count}}</td>
  161. <td>{{commafy ready_count}}</td>
  162. <td>{{commafy requeue_count}}</td>
  163. <td>{{commafy finish_count}}</td>
  164. <td>{{commafy message_count}}</td>
  165. <td>{{nanotohuman connected}}</td>
  166. </tr>
  167. {{/each}}
  168. {{/unless}}
  169. {{/each}}
  170. {{/unless}}
  171. {{/each}}
  172. </table>
  173. {{/unless}}
  174. </div>