service_config.hbs 5.6 KB

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