step3.hbs 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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="confirm-hosts">
  19. <h2>{{t installer.step3.header}}</h2>
  20. <p class="alert alert-info">{{t installer.step3.body}}</p>
  21. <div class="box">
  22. <div class="box-header">
  23. <div class="button-section">
  24. {{#unless isBackDisabled}}
  25. <button class="btn btn-primary step3-remove-selected-btn" {{bindAttr disabled="view.noHostsSelected"}}
  26. {{action removeSelectedHosts target="controller" }}><i class="icon-trash icon-white"></i>
  27. {{t installer.step3.removeSelected}}
  28. </button>
  29. {{/unless}}
  30. {{#unless isRetryDisabled}}
  31. <a class="btn btn-primary decommission"
  32. href="#" {{action retrySelectedHosts target="view"}}><i class="icon-repeat icon-white"></i>
  33. {{t installer.step3.retryFailed}}
  34. </a>
  35. {{/unless}}
  36. <div id="host-filter" class="pull-right">
  37. <ul class="clearfix">
  38. <li class="first">{{t common.show}}:</li>
  39. {{#each category in view.categories}}
  40. <li {{bindAttr class=":filter-status category.itemClass"}}>
  41. <a {{action selectCategory category target="view"}} href="#">
  42. {{category.label}}
  43. </a>
  44. </li>
  45. {{#unless category.last}}
  46. <li class="divider">|</li>
  47. {{/unless}}
  48. {{/each}}
  49. </ul>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="pre-scrollable" style="max-height: 440px;">
  54. <table id="confirm-hosts-table" class="table table-bordered table-striped">
  55. <thead>
  56. <tr>
  57. <th class="tinyspan">
  58. {{view Ember.Checkbox checkedBinding="view.pageChecked"}}
  59. </th>
  60. <th class="span5">{{t common.host}}</th>
  61. <!-- retrieved from local storage initially -->
  62. <th class="span2">{{t common.progress}}</th>
  63. <th class="span2">{{t common.status}}</th>
  64. <!-- given by the parsing function that parses data from bootstrap call, dynamically assign the color -->
  65. <th class="span2">{{t common.action}}</th>
  66. <!-- trash icon -->
  67. <!-- retry icon -->
  68. </tr>
  69. </thead>
  70. <tbody>
  71. {{#if view.pageContent}}
  72. {{#each host in view.pageContent}}
  73. {{#view App.WizardHostView categoryBinding="controller.category" hostInfoBinding="host"}}
  74. <td class="step3-table-checkbox">
  75. {{view Ember.Checkbox checkedBinding="host.isChecked"}}
  76. </td>
  77. <td class="host">
  78. <span title="{{unbound host.name}}" class="trim_hostname">{{host.name}}</span>
  79. </td>
  80. <td class="step3-table-progress">
  81. <div {{bindAttr class="host.bootBarColor host.isBootDone::progress-striped host.isBootDone::active :progress"}}>
  82. <div class="bar" style="width:100%">
  83. </div>
  84. </div>
  85. </td>
  86. <td class="step3-table-status">
  87. <a href="javascript:void(null)"
  88. data-toggle="modal" {{action hostLogPopup host target="controller"}}><span {{bindAttr class="host.bootStatusColor"}}>{{host.bootStatusForDisplay}}</span></a>
  89. </td>
  90. <td class="step3-table-action">
  91. <a class="btn btn-mini" {{action remove target="view"}}{{bindAttr disabled="isBackDisabled"}}><i class="icon-trash"></i>
  92. {{t common.remove}}</a>
  93. </td>
  94. {{/view}}
  95. {{/each}}
  96. {{else}}
  97. <tr>
  98. <td class="step3-table-no-hosts" colspan="5">
  99. {{t hosts.table.noHosts}}
  100. </td>
  101. </tr>
  102. {{/if}}
  103. </tbody>
  104. </table>
  105. </div>
  106. <div id="hosts">
  107. <div class="page-bar">
  108. <div class="selected-hosts-info pull-left">
  109. {{#if view.selectedHostsCount}}
  110. <a {{action selectedHostsPopup target="controller"}} href="#">
  111. {{view.selectedHostsCount}}
  112. {{pluralize view.selectedHostsCount singular="t:hosts.filters.selectedHostInfo" plural="t:hosts.filters.selectedHostsInfo"}}
  113. </a>
  114. -
  115. <a {{action unSelectAll target="view"}} href="#">{{t hosts.filters.clearSelection}}</a>
  116. {{/if}}
  117. </div>
  118. <div class="items-on-page">
  119. <label>{{t common.show}}: {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
  120. </div>
  121. <div class="info">{{view.paginationInfo}}</div>
  122. <div class="paging_two_button">
  123. {{view view.paginationFirst}}
  124. {{view view.paginationLeft}}
  125. {{view view.paginationRight}}
  126. {{view view.paginationLast}}
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. {{#if hasMoreRegisteredHosts}}
  132. <div {{bindAttr class=":alert alert-warn"}}>
  133. <a href="#" {{action registeredHostsPopup target="controller"}}>{{view.registeredHostsMessage}}</a>
  134. </div>
  135. {{/if}}
  136. {{#unless disableHostCheck}}
  137. <div {{bindAttr class=":alert view.status isWarningsBoxVisible::hidden"}}>
  138. {{view.message}}
  139. <a href="#" {{action hostWarningsPopup warnings target="controller"}}>{{view.linkText}}</a>
  140. {{#unless isBootstrapFailed}}
  141. {{#unless isWarningsLoaded}}
  142. {{view App.SpinnerView}}
  143. {{/unless}}
  144. {{/unless}}
  145. </div>
  146. {{/unless}}
  147. <div class="btn-area">
  148. <button type="button" class="btn pull-left installer-back-btn" {{bindAttr disabled="isBackButtonDisabled"}} {{action back}}>
  149. &larr; {{t common.back}}
  150. {{#if App.router.backBtnClickInProgress}}
  151. {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
  152. {{/if}}
  153. </button>
  154. <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="isNextButtonDisabled"}} {{action submit target="controller"}}>
  155. {{#if App.router.nextBtnClickInProgress}}
  156. {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
  157. {{/if}}
  158. {{t common.next}} &rarr;
  159. </button>
  160. </div>
  161. </div>