service_config.hbs 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 view.supportsHostOverrides}}
  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>{{t dashboard.services.configs.popup.restartService.header}}</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. {{#if view.supportsHostOverrides}}
  48. <div class="alert alert-info">
  49. {{t common.group}}&nbsp;
  50. <span class="btn-group">
  51. <button {{bindAttr disabled="controller.isHostsConfigsPage"}} class="btn dropdown-toggle"
  52. data-toggle="dropdown">{{selectedConfigGroup.displayNameHosts}}</button>
  53. <button {{bindAttr disabled="controller.isHostsConfigsPage"}} class="btn dropdown-toggle" data-toggle="dropdown">
  54. <span class="caret"></span>
  55. </button>
  56. <ul class="dropdown-menu">
  57. <!-- available config group menu links -->
  58. {{#each configGroup in configGroups}}
  59. <li>
  60. <a href="#" {{action "selectConfigGroup" configGroup target="controller"}}>
  61. {{configGroup.displayNameHosts}}
  62. </a>
  63. </li>
  64. {{/each}}
  65. </ul>
  66. </span>
  67. {{#isAccessible ADMIN}}
  68. {{#if controller.isHostsConfigsPage}}
  69. &nbsp;<a href="#" {{action "switchHostGroup" target="controller"}}>{{t common.change}}</a>
  70. {{else}}
  71. <a href="#" class="link-left-pad" {{action "manageConfigurationGroup" target="controller"}}>{{t services.service.actions.manage_configuration_groups.short}}</a>
  72. {{/if}}
  73. {{/isAccessible}}
  74. <div class="pull-right">
  75. {{view App.FilterComboCleanableView filterBinding="view.filter" columnsBinding="view.columns" popoverDescriptionBinding="view.propertyFilterPopover"}}
  76. </div>
  77. </div>
  78. {{/if}}
  79. {{#if view.showConfigHistoryFeature}}
  80. {{view App.ConfigHistoryFlowView serviceBinding="selectedService"}}
  81. {{/if}}
  82. {{#if versionLoaded}}
  83. {{#unless hideDependenciesInfoBar}}
  84. <div {{bindAttr class="hasChangedDependencies:show:hide :dependencies-info"}}>
  85. <div class="dependencies-info-bar-wrapper">
  86. <div class="alert alert-warning">
  87. <span>{{dependenciesMessage}}</span> <a
  88. href="#" {{action "showChangedDependentConfigs" target="controller"}}>{{t common.showDetails}}</a>
  89. </div>
  90. </div>
  91. </div>
  92. {{/unless}}
  93. {{#if view.supportsConfigLayout}}
  94. <ul class="nav nav-tabs mbm">
  95. {{#each tab in view.tabs}}
  96. {{#unless tab.isHiddenByFilter}}
  97. <li {{bindAttr class="tab.isActive:active" }}>
  98. <a href="#" {{action "setActiveTab" tab target="view"}} {{bindAttr data-target="tab.headingClass"}} data-toggle="tab">
  99. {{tab.displayName}}
  100. {{#if tab.isAdvanced}}
  101. {{#if controller.errorsCount}}
  102. <span class="badge badge-important">{{controller.errorsCount}}</span>
  103. {{/if}}
  104. {{else}}
  105. {{#if tab.errorsCount}}
  106. <span class="badge badge-important">{{tab.errorsCount}}</span>
  107. {{/if}}
  108. {{/if}}
  109. </a>
  110. </li>
  111. {{/unless}}
  112. {{/each}}
  113. </ul>
  114. <div class="tab-content">
  115. {{#each tab in view.tabs}}
  116. <div {{bindAttr class=":tab-pane tab.isActive:active tab.id"}}>
  117. {{#if tab.isAdvanced}}
  118. {{#each category in selectedService.configCategories}}
  119. <div class="accordion">
  120. {{#if category.isCustomView}}
  121. {{view category.customView categoryBinding="category" serviceBinding="selectedService" canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
  122. {{else}}
  123. {{view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit" serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs" supportsHostOverridesBinding="view.supportsHostOverrides"}}
  124. {{/if}}
  125. </div>
  126. {{/each}}
  127. {{else}}
  128. {{! Render Enhanced Config Section }}
  129. {{view App.ServiceConfigLayoutTabView contentBinding="tab" canEditBinding="view.canEdit" }}
  130. {{/if}}
  131. </div>
  132. {{/each}}
  133. </div>
  134. {{else}}
  135. {{#each category in selectedService.configCategories}}
  136. <div class="accordion">
  137. {{#if category.isCustomView}}
  138. {{view category.customView categoryBinding="category" serviceBinding="selectedService" canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
  139. {{else}}
  140. {{view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit" serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs" supportsHostOverridesBinding="view.supportsHostOverrides"}}
  141. {{/if}}
  142. </div>
  143. {{/each}}
  144. {{/if}}
  145. {{else}}
  146. <div class="spinner"></div>
  147. {{/if}}