nodes.hbs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {{> warning}}
  2. {{> error}}
  3. <div class="row">
  4. <div class="col-md-12">
  5. <h2>消息服务实例 ({{collection.length}})</h2>
  6. </div>
  7. </div>
  8. <div class="row">
  9. <div class="col-md-12">
  10. <table class="table table-condensed table-bordered">
  11. <tr>
  12. <th>主机</th>
  13. <th>广播地址</th>
  14. <th>TCP端口</th>
  15. <th>HTTP端口</th>
  16. <th>版本</th>
  17. {{#if nsqlookupd.length}}
  18. <th>连接的发现服务</th>
  19. {{/if}}
  20. <th>主题</th>
  21. </tr>
  22. {{#each collection}}
  23. <tr {{#if out_of_date}}class="warning"{{/if}}>
  24. <td>{{hostname}}</td>
  25. <td><a class="link" href="{{basePath "/nodes"}}/{{broadcast_address_http}}">{{broadcast_address}}</a></td>
  26. <td>{{tcp_port}}</td>
  27. <td>{{http_port}}</td>
  28. <td>{{version}}</td>
  29. {{#if ../nsqlookupd.length}}
  30. <td>
  31. <a class="conn-count btn btn-default btn-xs {{#unlesseq ../../nsqlookupd.length remote_addresses.length}}btn-warning{{/unlesseq}}">{{remote_addresses.length}}</a>
  32. <div style="display: none;">
  33. {{#each remote_addresses}}{{this}}<br/>{{/each}}
  34. </div>
  35. </td>
  36. {{/if}}
  37. <td>
  38. {{#if topics.length}}
  39. <span class="badge">{{topics.length}}</span>
  40. {{#each topics}}
  41. <a href="{{basePath "/topics"}}/{{topic}}" class="link label {{#if tombstoned}}label-warning{{else}}label-primary{{/if}}" {{#if tombstoned}}title="***"{{/if}}>{{topic}}</a>
  42. {{/each}}
  43. {{/if}}
  44. </td>
  45. </tr>
  46. {{/each}}
  47. </table>
  48. </div>
  49. </div>