service_config.hbs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. {{#if App.supports.hostOverrides}}
  19. {{#if selectedService.restartRequired}}
  20. <div class="alert">
  21. <div class="clearfix like_pointer collapsable" {{action toggleRestartMessageView target="view"}}>
  22. {{#if view.isRestartMessageCollapsed}}
  23. <i class="icon-caret-down pull-left"></i>
  24. {{else}}
  25. <i class="icon-caret-right pull-left"></i>
  26. {{/if}}
  27. <i class="icon-refresh"></i>
  28. <strong>Restart Service</strong> {{selectedService.restartRequiredMessage}}
  29. </div>
  30. <div class="service-body">
  31. <ul>
  32. {{#each host in selectedService.restartRequiredHostsAndComponents}}
  33. <li>
  34. <a href="#" {{action showDetails host.hostData}}>{{host.hostData.publicHostName}}</a>
  35. <ul>
  36. {{#each component in host.components}}
  37. <li>{{component.name}}</li>
  38. {{/each}}
  39. </ul>
  40. </li>
  41. {{/each}}
  42. </ul>
  43. </div>
  44. </div>
  45. {{/if}}
  46. {{/if}}
  47. <div class="accordion">
  48. {{#each category in selectedService.configCategories}}
  49. {{#if category.isCustomView}}
  50. {{#if App.supports.capacitySchedulerUi}}
  51. {{view category.customView categoryBinding="category" serviceBinding="selectedService" canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
  52. {{/if}}
  53. {{else}}
  54. {{#view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit" serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs"}}
  55. <div class="accordion-heading" {{action "onToggleBlock" category target="view"}}>
  56. <i {{bindAttr class=":pull-left :accordion-toggle category.isCollapsed:icon-caret-right:icon-caret-down"}}></i>
  57. <a class="accordion-toggle">{{category.displayName}}</a>
  58. </div>
  59. <div class="accordion-body collapse in">
  60. <div class="accordion-inner service-config-section">
  61. <form class="form-horizontal">
  62. {{#each view.filteredCategoryConfigs}}
  63. <div {{bindAttr class=":entry-row isOverridden:overridden-property"}}>
  64. <span {{bindAttr class="errorMessage:error: :control-group :control-label-span"}}>
  65. <label class="control-label">
  66. {{#if App.supports.hostOverrides}}
  67. {{#if isRestartRequired}}
  68. <i class="icon-refresh restart-required-property" rel="tooltip" {{bindAttr title="restartRequiredMessage"}}></i>
  69. {{/if}}
  70. {{/if}}
  71. {{displayName}}
  72. </label>
  73. </span>
  74. <div class="controls">
  75. {{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
  76. <div {{bindAttr class="errorMessage:error: :control-group"}}>
  77. {{view viewClass serviceConfigBinding="this" categoryConfigsAllBinding="view.categoryConfigsAll" }}
  78. {{#if view.canEdit}}
  79. {{#if isPropertyOverridable}}
  80. {{#if App.supports.hostOverrides}}
  81. <a class="action" {{action "createOverrideProperty" this target="view" }} ><i class="icon-plus-sign"></i>{{t common.exception}}</a>
  82. {{/if}}
  83. {{/if}}
  84. {{#if cantBeUndone}}
  85. {{else}}
  86. {{#if isNotDefaultValue}}
  87. <a class="action" {{action "doRestoreDefaultValue" this target="view" }} ><i class="icon-undo"></i>{{t common.undo}}</a>
  88. {{/if}}
  89. {{/if}}
  90. {{#if isRemovable}}
  91. <a class="action" {{action "removeProperty" this target="view" }} ><i class="icon-minus-sign"></i>{{t common.remove}}</a>
  92. {{/if}}
  93. {{/if}}
  94. <span class="help-inline">{{errorMessage}}</span>
  95. </div>
  96. {{#if this.isOverridden}}
  97. {{view App.ServiceConfigView.SCPOverriddenRowsView serviceConfigPropertyBinding="this"}}
  98. {{/if}}
  99. </div>
  100. </div>
  101. {{/each}}
  102. {{! For Advanced, Advanced Core Site, Advanced HDFS Site sections, show the 'Add Property' link.}}
  103. {{#if view.canEdit}}
  104. {{#if category.canAddProperty }}
  105. <div>
  106. <a href="#" {{action "showAddPropertyWindow" this target="view" }} >{{t installer.step7.config.addProperty}}...</a>
  107. </div>
  108. {{/if}}
  109. {{/if}}
  110. </form>
  111. </div>
  112. </div>
  113. {{/view}}
  114. {{/if}}
  115. {{/each}}
  116. </div>