assign_master_components.hbs 6.1 KB

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