configs.hbs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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="serviceConfig">
  19. {{#if dataIsLoaded}}
  20. <div class="accordion">
  21. {{#each category in selectedService.configCategories}}
  22. <div class="accordion-group {{unbound category.name}}">
  23. <div class="accordion-heading" {{action "onToggleBlock" category target="view"}}>
  24. {{#if category.isCollapsed}}
  25. <i class='icon-caret-right pull-left accordion-toggle'></i>
  26. {{else}}
  27. <i class='icon-caret-down pull-left accordion-toggle'></i>
  28. {{/if}}
  29. <a class="accordion-toggle">
  30. {{category.name}}
  31. </a>
  32. </div>
  33. {{#view App.ServiceConfigsByCategoryView categoryBinding="category" serviceConfigsBinding="selectedService.configs"}}
  34. <form class="form-horizontal">
  35. {{#each view.categoryConfigs}}
  36. {{#if isVisible}}
  37. <div {{bindAttr class="errorMessage:error: :control-group"}}>
  38. <label class="control-label">{{displayName}}</label>
  39. <div class="controls">
  40. {{view viewClass serviceConfigBinding="this" categoryConfigsBinding="view.categoryConfigs"}}
  41. <span class="help-inline">{{errorMessage}}</span>
  42. </div>
  43. </div>
  44. {{/if}}
  45. {{/each}}
  46. </form>
  47. {{/view}}
  48. </div>
  49. {{/each}}
  50. </div>
  51. {{#if App.router.loginController.isAdmin}}
  52. <p class="pull-right">
  53. <!--<input class="btn btn-primary" type="button" value="Save and apply changes" {{!bindAttr disabled="isSubmitDisabled"}} />-->
  54. <a class="btn btn-primary" {{bindAttr disabled="isSubmitDisabled"}}
  55. {{action restartServicePopup target="controller"}}>Save and apply changes</a>
  56. </p>
  57. {{/if}}
  58. {{else}}
  59. <div class="spinner"></div>
  60. {{/if}}
  61. </div>