service_config.hbs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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">{{selectedConfigGroup.displayNameHosts}}</button>
  52. <button {{bindAttr disabled="controller.isHostsConfigsPage"}} class="btn dropdown-toggle" data-toggle="dropdown">
  53. <span class="caret"></span>
  54. </button>
  55. <ul class="dropdown-menu">
  56. <!-- available config group menu links -->
  57. {{#each configGroup in configGroups}}
  58. <li>
  59. <a href="#" {{action "selectConfigGroup" configGroup target="controller"}}>
  60. {{configGroup.displayNameHosts}}
  61. </a>
  62. </li>
  63. {{/each}}
  64. </ul>
  65. </span>
  66. {{#if App.isAdmin}}
  67. {{#if controller.isHostsConfigsPage}}
  68. &nbsp;<a href="#" {{action "switchHostGroup" target="controller"}}>{{t common.change}}</a>
  69. {{else}}
  70. <a href="#" class="link-left-pad" {{action "manageConfigurationGroup" target="controller"}}>{{t services.service.actions.manage_configuration_groups.short}}</a>
  71. {{/if}}
  72. {{/if}}
  73. <div class="pull-right">
  74. {{view App.FilterComboCleanableView filterBinding="view.filter" columnsBinding="view.columns" popoverDescriptionBinding="view.propertyFilterPopover"}}
  75. </div>
  76. </div>
  77. {{/if}}
  78. {{#if App.supports.configHistory}}
  79. {{#if view.showConfigHistoryFlow}}
  80. {{view App.ConfigHistoryFlowView serviceBinding="selectedService"}}
  81. {{/if}}
  82. {{/if}}
  83. {{#if versionLoaded}}
  84. <div class="accordion">
  85. {{#each category in selectedService.configCategories}}
  86. {{#if category.isCustomView}}
  87. {{#if App.supports.capacitySchedulerUi}}
  88. {{view category.customView categoryBinding="category" serviceBinding="selectedService" canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
  89. {{/if}}
  90. {{else}}
  91. {{view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit" serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs" supportsHostOverridesBinding="view.supportsHostOverrides"}}
  92. {{/if}}
  93. {{/each}}
  94. </div>
  95. {{else}}
  96. <div class="spinner"></div>
  97. {{/if}}