flume.hbs 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {{!
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. }}
  18. <!-- Flume Agents -->
  19. <div id="flume-summary">
  20. <a href="#" {{action filterHosts view.flumeHandlerComponent}}>{{view.summaryHeader}}</a>
  21. <a href="#" class="pull-right" {{action gotoConfigs target="controller"}}>{{t dashboard.services.flume.summary.configure}}</a>
  22. <div id="flume-agent-table-wrap" class="scrollable-container">
  23. <table class="table table-hover table-bordered table-striped" id="flume-agents-table">
  24. <thead>
  25. {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}}
  26. {{view view.parentView.hostSort}}
  27. <th>{{t dashboard.services.flume.agent}}</th>
  28. <th><i class="icon-signin" {{translateAttr title="dashboard.services.flume.sources"}}></i></th>
  29. <th><i class="icon-random" {{translateAttr title="dashboard.services.flume.channels"}}></i></th>
  30. <th><i class="icon-signout" {{translateAttr title="dashboard.services.flume.sinks"}}></i></th>
  31. {{/view}}
  32. </thead>
  33. {{#if view.pageContent}}
  34. {{#each host in view.pageContent}}
  35. <tbody class="flume-agent-table-tbody">
  36. {{#view view.agentView contentBinding="host"}}
  37. <td {{bindAttr rowspan="host.rowspan"}} id="flume-host-agent-row" class="agent-host-name">
  38. <a href="javascript:void(null)" {{action showDetails host.agents}}>
  39. {{host.hostName}}
  40. </a>
  41. </td>
  42. <td class="agent-status">
  43. <div class="wrapp-flume-status">
  44. <div class="pull-left"><span {{bindAttr class="host.firtstAgent.healthClass"}}></span> {{host.firtstAgent.name}}</div>
  45. <div class="btn-wrapper">
  46. <div class="btn-group display-inline-block flume-agents-actions">
  47. <a {{bindAttr class=":btn :dropdown-toggle"}} data-toggle="dropdown" href="javascript:void(null)">{{host.firtstAgent.displayStatus}}
  48. <span class="caret"></span>
  49. </a>
  50. <ul class="pull-left dropdown-menu">
  51. <li {{bindAttr class="host.firtstAgent.isStartAgentDisabled:disabled"}}>
  52. <a href="javascript:void(null)"
  53. {{bindAttr class="host.firtstAgent.isStartAgentDisabled:disabled"}}
  54. {{action startFlumeAgent host.firtstAgent target="controller"}}>
  55. {{t services.service.summary.flume.startAgent}}</a>
  56. </li>
  57. <li {{bindAttr class="host.firtstAgent.isStopAgentDisabled:disabled"}}>
  58. <a href="javascript:void(null)"
  59. {{bindAttr class="host.firtstAgent.isStopAgentDisabled:disabled"}}
  60. {{action stopFlumeAgent host.firtstAgent target="controller"}}>
  61. {{t services.service.summary.flume.stopAgent}}</a>
  62. </li>
  63. </ul>
  64. </div>
  65. </div>
  66. </div>
  67. </td>
  68. <td>
  69. {{host.firtstAgent.sourcesCount}}
  70. </td>
  71. <td>
  72. {{host.firtstAgent.channelsCount}}
  73. </td>
  74. <td>
  75. {{host.firtstAgent.sinksCount}}
  76. </td>
  77. {{/view}}
  78. {{#each agent in host.otherAgents}}
  79. {{#view view.agentView contentBinding="host"}}
  80. <td class="agent-status">
  81. <div class="wrapp-flume-status">
  82. <div class="pull-left"><span {{bindAttr class="agent.healthClass"}}></span> {{agent.name}}</div>
  83. <div class="btn-wrapper">
  84. <div class="btn-group display-inline-block flume-agents-actions">
  85. <a {{bindAttr class=":btn :dropdown-toggle"}} data-toggle="dropdown" href="javascript:void(null)">{{agent.displayStatus}}
  86. <span class="caret"></span>
  87. </a>
  88. <ul class="pull-left dropdown-menu">
  89. <li {{bindAttr class="agent.isStartAgentDisabled:disabled"}}>
  90. <a href="javascript:void(null)"
  91. {{bindAttr class="agent.isStartAgentDisabled:disabled"}}
  92. {{action startFlumeAgent agent target="controller"}}>
  93. {{t services.service.summary.flume.startAgent}}</a>
  94. </li>
  95. <li {{bindAttr class="agent.isStopAgentDisabled:disabled"}}>
  96. <a href="javascript:void(null)"
  97. {{bindAttr class="agent.isStopAgentDisabled:disabled"}}
  98. {{action stopFlumeAgent agent target="controller"}}>
  99. {{t services.service.summary.flume.stopAgent}}</a>
  100. </li>
  101. </ul>
  102. </div>
  103. </div>
  104. </div>
  105. </td>
  106. <td class="flume-agent-sources-count">
  107. {{agent.sourcesCount}}
  108. </td>
  109. <td class="flume-agent-channels-count">
  110. {{agent.channelsCount}}
  111. </td>
  112. <td class="flume-agent-sink-count">
  113. {{agent.sinksCount}}
  114. </td>
  115. {{/view}}
  116. {{/each}}
  117. </tbody>
  118. {{/each}}
  119. {{else}}
  120. <tr>
  121. <td colspan="6" id="flume-agents-empty-label" class="empty-label">
  122. {{t services.service.summary.flume.noAgents}}
  123. </td>
  124. </tr>
  125. {{/if}}
  126. </table>
  127. </div>
  128. </div>