host.hbs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. <div class="btn-group">
  22. <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
  23. Rack
  24. <span class="caret"></span>
  25. </button>
  26. <ul class="dropdown-menu">
  27. {{#each clusters}}
  28. <li>
  29. <a href="javascript:void(null)" data-toggle="modal" {{action "assignedToRackPopup" this target="controller"}}>
  30. {{clusterName}}
  31. </a>
  32. </li>
  33. {{/each}}
  34. </ul>
  35. </div>
  36. <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary decommission" data-toggle="modal" {{action "decommissionButtonPopup" target="controller"}}>
  37. Decommission
  38. </button>
  39. <button {{bindAttr disabled="controller.isDisabled"}} class="btn btn-primary" data-toggle="modal" {{action "deleteButtonPopup" target="controller"}}>
  40. Delete
  41. </button>
  42. <button class="btn btn-inverse add-host-button" {{action addHost}}>
  43. <i class="icon-plus icon-white"></i>
  44. Add New Host
  45. </button>
  46. </div>
  47. </div>
  48. <table class="table table-bordered table-striped">
  49. <thead>
  50. <tr>
  51. <th class="first">
  52. <label class="checkbox">
  53. {{view Ember.Checkbox checkedBinding="allChecked" class="checkbox"}}
  54. </label>
  55. </th>
  56. <th>
  57. <a href="#" {{action sortByName target="controller" }}>Name</a>
  58. {{#if controller.isSort}}
  59. <i class="icon-arrow-up"{{bindAttr class="controller.sortClass"}}></i>
  60. {{/if}}
  61. </th>
  62. <th>Rack</th>
  63. <th>CPU</th>
  64. <th>RAM</th>
  65. <th>Disk Usage</th>
  66. <th>Load Avg</th>
  67. <th>
  68. <div {{bindAttr class="view.btnGroupClass"}} >
  69. <button class="btn btn-info" {{action "clickFilterButton" target="view"}}>
  70. Components
  71. <span class="caret"></span>
  72. </button>
  73. <ul class="dropdown-menu filter-components" id="filter-dropdown">
  74. {{#each component in componentsForFilter}}
  75. <li>
  76. <label>
  77. {{view view.ComponentCheckboxView contentBinding="component"}} {{unbound component.componentName}}
  78. </label>
  79. </li>
  80. {{/each}}
  81. </ul>
  82. <button {{bindAttr disabled="view.isApplyDisabled"}} class="btn" {{action "applyFilters" target="view"}}>
  83. Apply
  84. </button>
  85. </div>
  86. </th>
  87. </tr>
  88. </thead>
  89. <tbody>
  90. {{#each host in controller}}
  91. {{#view view.HostView contentBinding="host"}}
  92. <tr>
  93. <td class="first">
  94. <label class="checkbox">
  95. {{view view.HostCheckboxView checkedBinding="host.isChecked" contentBinding="host"}}
  96. </label>
  97. </td>
  98. <td class="name">
  99. <span class="health-status-{{unbound host.healthStatus}}"></span>
  100. <a href="#" {{action "showDetails" host}}>{{unbound host.hostName}}</a>
  101. </td>
  102. <td>{{host.cluster.clusterName}}</td>
  103. <td>{{host.cpu}}</td>
  104. <td>{{host.memory}}</td>
  105. <td>{{host.diskUsage}}</td>
  106. <td>{{host.loadAvg}}</td>
  107. <td>
  108. {{view.labels}}
  109. </td>
  110. </tr>
  111. {{/view}}
  112. {{/each}}
  113. </tbody>
  114. </table>
  115. <div class="box-footer">
  116. <hr />
  117. <div class="footer-pagination">
  118. <ul class="nav nav-pills">
  119. <li class="disabled">Show Hosts</li>
  120. <li class="dropdown">
  121. {{view Em.Select contentBinding="pageSizeRange"
  122. selectionBinding="pageSize"
  123. optionValuePath="this"}}
  124. </li>
  125. <li class="disabled">{{startPosition}}-{{rangeStop}} of {{total}}</li>
  126. <li class="disabled page-listing">
  127. {{#if hasPrevious}}
  128. <a href="#" {{action showPreviousPage target="controller"}}>previous</a>
  129. {{/if}}
  130. {{#if hasNext}}
  131. <a href="#" {{action showNextPage target="controller"}}>next</a>
  132. {{/if}}
  133. </li>
  134. </ul>
  135. </div>
  136. </div>
  137. </div>