assign_master_components.hbs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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="assign-masters">
  19. {{#if view.showTitle}}
  20. <h2>{{view.title}}</h2>
  21. {{/if}}
  22. <div class="alert alert-info">
  23. {{{view.alertMessage}}}
  24. </div>
  25. {{#each msg in controller.generalErrorMessages}}
  26. <div class="alert alert-error">{{msg}}</div>
  27. {{/each}}
  28. {{#each msg in controller.generalWarningMessages}}
  29. <div class="alert alert-warning">{{msg}}</div>
  30. {{/each}}
  31. {{#if controller.isLoaded}}
  32. <div class="assign-masters row-fluid">
  33. <div class="select-hosts span7">
  34. <div class="row-fluid">
  35. {{#if showCurrentHost}}
  36. <div class="span12 control-group mlc">
  37. <div class="row-fluid">
  38. <div class="span4"><span class="pull-right control-label">{{t services.reassign.step2.currentHost}}</span>
  39. </div>
  40. <div class="span8"><span>{{currentHostId}}</span></div>
  41. </div>
  42. </div>
  43. {{/if}}
  44. <div class="clearfix"></div>
  45. <div class="row-fluid">
  46. <div class="span12 control-group">
  47. <form class="form-horizontal" autocomplete="off">
  48. <!-- View for array controller -->
  49. {{#each controller.additionalHostsList}}
  50. <div class="row-fluid additional-hosts-list">
  51. <div class="span5">
  52. <label class="pts pull-right">
  53. {{label}}
  54. </label>
  55. </div>
  56. <div class="span7 host-cell">
  57. {{host}}
  58. </div>
  59. </div>
  60. {{/each}}
  61. {{#each servicesMastersToShow}}
  62. <div class="row-fluid">
  63. <div class="span5">
  64. <div class="control-group">
  65. <label class="pts pull-right">
  66. {{#if showCurrentPrefix}}
  67. {{t common.current}}
  68. {{/if}}
  69. {{#if showAdditionalPrefix}}
  70. {{t common.additional}}
  71. {{/if}}
  72. {{display_name}}:
  73. </label>
  74. </div>
  75. </div>
  76. <div class="span7">
  77. {{#if isServiceCoHost}}
  78. <div class="hostName">
  79. {{selectedHost}}<i class="icon-asterisks">&#10037;</i>
  80. </div>
  81. {{else}}
  82. <div {{bindAttr class="errorMessage:error: warnMessage:warning: :control-group"}}>
  83. {{#if view.shouldUseInputs}}
  84. {{view App.InputHostView
  85. componentBinding="this"
  86. disabledBinding="isInstalled" }}
  87. {{else}}
  88. {{view App.SelectHostView
  89. componentBinding="this"
  90. disabledBinding="isInstalled"
  91. optionValuePath="content.host_name"
  92. optionLabelPath="content.host_info" }}
  93. {{/if}}
  94. {{#if showAddControl}}
  95. {{view App.AddControlView componentNameBinding="component_name"}}
  96. {{/if}}
  97. {{#if showRemoveControl}}
  98. {{view App.RemoveControlView componentNameBinding="component_name" serviceComponentIdBinding="serviceComponentId"}}
  99. {{/if}}
  100. <span rel="popover" title="Warning" {{bindAttr data-content="warnMessage"}}>
  101. {{#if warnMessage}}
  102. <i class="icon-warning-sign"></i>
  103. {{/if}}
  104. </span>
  105. <span rel="popover" title="Error" {{bindAttr data-content="errorMessage"}}>
  106. {{#if errorMessage}}
  107. <i class="icon-exclamation-sign"></i>
  108. {{/if}}
  109. </span>
  110. </div>
  111. {{/if}}
  112. </div>
  113. </div>
  114. {{/each}}
  115. </form>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="host-assignments span5">
  121. {{#each masterHostMapping}}
  122. <div class="mapping-box round-corners well">
  123. <div class="hostString"><span>{{hostInfo}}</span></div>
  124. {{#each masterServicesToDisplay}}
  125. <span {{bindAttr class="isInstalled:assignedService:newService :round-corners"}}>{{display_name}}</span>
  126. {{/each}}
  127. </div>
  128. {{/each}}
  129. {{#if remainingHosts}}
  130. <div class="remaining-hosts round-corners well">
  131. <span><strong>{{remainingHosts}}</strong> {{t installer.step5.attention}}</span></div>
  132. {{/if}}
  133. </div>
  134. <div class="clearfix"></div>
  135. </div>
  136. {{else}}
  137. {{view App.SpinnerView}}
  138. {{/if}}
  139. <div class="btn-area">
  140. {{#if view.isBackButtonVisible}}
  141. <button type="button" class="btn pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}}>
  142. &larr; {{t common.back}}
  143. {{#if App.router.backBtnClickInProgress}}
  144. {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
  145. {{/if}}
  146. </button>
  147. {{/if}}
  148. <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="nextButtonDisabled"}} {{action submit target="controller"}}>
  149. {{#if App.router.nextBtnClickInProgress}}
  150. {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
  151. {{/if}}
  152. {{view.acceptButtonText}}
  153. </button>
  154. {{#if view.isCancelButtonVisible}}
  155. <button class="btn pull-right mrm" {{action onCancel target="controller"}}>{{t common.cancel}}</button>
  156. {{/if}}
  157. </div>
  158. </div>