lookup.hbs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{> warning}}
  2. {{> error}}
  3. <div class="row">
  4. <div class="col-md-12">
  5. <h2>消息服务发现</h2>
  6. </div>
  7. </div>
  8. {{#unless nsqlookupd.length}}
  9. <div class="alert alert-warning">
  10. <h4>注意</h4> 消息服务发现实例未运行
  11. </div>
  12. {{else}}
  13. <div class="row">
  14. <div class="col-md-4">
  15. <table class="table table-bordered table-condensed">
  16. <tr>
  17. <th>消息服务发现实例</th>
  18. </tr>
  19. {{#each nsqlookupd}}
  20. <tr><td>{{this}}</td></tr>
  21. {{/each}}
  22. </table>
  23. </div>
  24. </div>
  25. <div class="row">
  26. <div class="col-md-4">
  27. {{#if topics}}
  28. {{!-- <div class="alert alert-info">
  29. Below is a tree of Topics/Channels that are currently inactive (i.e. not produced on any nsqd in the cluster but are present in the lookup data)
  30. </div> --}}
  31. <ul>
  32. {{#each topics}}
  33. <li>
  34. <button class="btn-link red delete-topic-link" data-topic="{{name}}" style="padding: 0 6px; border: 0;">✘</button> <a class="link" href="{{basePath "/topics"}}/{{name}}">{{name}}</a>
  35. <ul>
  36. {{#each channels}}
  37. <li>
  38. <button class="btn-link red delete-channel-link" data-topic="{{../name}}" data-channel="{{this}}" style="padding: 0 6px; border: 0;">✘</button> <a class="link" href="{{basePath "/topics"}}/{{../name}}/{{this}}">{{this}}</a>
  39. </li>
  40. {{/each}}
  41. </ul>
  42. </li>
  43. {{/each}}
  44. </ul>
  45. {{else}}
  46. <div class="alert alert-warning"><h4>注意</h4>无活动的主题</div>
  47. {{/if}}
  48. </div>
  49. </div>
  50. {{#if isAdmin}}
  51. <div class="row">
  52. <div class="col-md-4">
  53. <form class="hierarchy">
  54. <legend>创建主题/订阅通道</legend>
  55. <div class="alert alert-info">
  56. </div>
  57. <div class="form-group">
  58. <input type="text" name="topic" placeholder="主题名">
  59. <input type="text" name="channel" placeholder="通道名">
  60. </div>
  61. <button class="btn btn-default" type="submit">创建</button>
  62. </form>
  63. </div>
  64. </div>
  65. {{/if}}
  66. {{/unless}}