host.hbs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. <div id="hosts" class="box">
  19. <div class="box-header">
  20. <div class="button-section">
  21. <button class="btn btn-inverse add-host-button" {{action addHost}}>
  22. <i class="icon-plus icon-white"></i>
  23. Add New Hosts
  24. </button>
  25. </div>
  26. </div>
  27. <table class="table table-bordered table-striped">
  28. <thead>
  29. <tr>
  30. <th class="name">
  31. <div class="host-name-pos">
  32. <a class="filter-label" href="#" {{action sortByName target="controller" }}>Name
  33. {{#if controller.isSort}}
  34. <i class="icon-arrow-up"{{bindAttr class="controller.sortClass"}}></i>
  35. {{/if}}
  36. </a>
  37. {{view Ember.TextField class="host-name-search" placeholder="search" valueBinding="view.filterByName"}}
  38. </div>
  39. </th>
  40. <th>Rack</th>
  41. <th>CPU</th>
  42. <th>RAM</th>
  43. <th>Disk Usage</th>
  44. <th>Load Avg</th>
  45. <th>
  46. <div {{bindAttr class="view.btnGroupClass"}} >
  47. <button class="btn btn-info single-btn-group" {{action "clickFilterButton" target="view"}}>
  48. Components
  49. <span class="caret"></span>
  50. </button>
  51. <ul class="dropdown-menu filter-components" id="filter-dropdown">
  52. <li>
  53. <label class="checkbox">
  54. {{view Ember.Checkbox checkedBinding="view.allComponentsChecked"}} All
  55. </label>
  56. </li>
  57. <li>
  58. <label class="checkbox">
  59. {{view Ember.Checkbox checkedBinding="view.masterComponentsChecked"}} Master Components:
  60. </label>
  61. <ul>
  62. {{#each component in masterComponents}}
  63. <li>
  64. <label class="checkbox">
  65. {{view Ember.Checkbox checkedBinding="component.checkedForHostFilter" }} {{unbound component.displayName}}
  66. </label>
  67. </li>
  68. {{/each}}
  69. </ul>
  70. </li>
  71. <li>
  72. <label class="checkbox">
  73. {{view Ember.Checkbox checkedBinding="view.slaveComponentsChecked"}} Slave Components:
  74. </label>
  75. <ul>
  76. {{#each component in slaveComponents}}
  77. <li>
  78. <label class="checkbox">
  79. {{view Ember.Checkbox checkedBinding="component.checkedForHostFilter" }} {{unbound component.displayName}}
  80. </label>
  81. </li>
  82. {{/each}}
  83. </ul>
  84. </li>
  85. <li class="align-right">
  86. <button class="btn" {{action "closeFilters" target="view"}}>
  87. Cancel
  88. </button>
  89. <button class="btn btn-primary" {{action "applyFilters" target="view"}}>
  90. Apply
  91. </button>
  92. </li>
  93. </ul>
  94. </div>
  95. </th>
  96. </tr>
  97. </thead>
  98. <tbody>
  99. {{#each host in controller}}
  100. {{#view view.HostView contentBinding="host"}}
  101. <tr>
  102. <td class="name">
  103. <span {{bindAttr class="host.healthClass"}}></span>
  104. <a href="#" {{action "showDetails" host}}>{{unbound host.hostName}}</a>
  105. </td>
  106. <td>{{host.cluster.clusterName}}</td>
  107. <td>{{host.cpu}}</td>
  108. <td>{{host.memoryFormatted}}</td>
  109. <td>
  110. <div class="progress progress-info">
  111. <div class="bar" {{bindAttr style="view.usageStyle"}} style="width: 20%"></div>
  112. </div>
  113. </td>
  114. <td>{{host.loadAvg}}</td>
  115. <td>
  116. {{view.labels}}
  117. </td>
  118. </tr>
  119. {{/view}}
  120. {{/each}}
  121. </tbody>
  122. </table>
  123. <div class="box-footer">
  124. <hr/>
  125. <div class="footer-pagination">
  126. <ul class="nav nav-pills">
  127. <li class="disabled">Show: </li>
  128. <li class="dropdown">
  129. {{view Em.Select contentBinding="pageSizeRange"
  130. selectionBinding="pageSize"
  131. optionValuePath="this"}}
  132. </li>
  133. <li class="disabled">{{startPosition}}-{{rangeStop}} of {{total}}</li>
  134. <li class="disabled page-listing">
  135. {{#if hasPrevious}}
  136. <a href="#" {{action showPreviousPage target="controller"}}>previous</a>
  137. {{/if}}
  138. {{#if hasNext}}
  139. <a href="#" {{action showNextPage target="controller"}}>next</a>
  140. {{/if}}
  141. </li>
  142. </ul>
  143. </div>
  144. </div>
  145. </div>