configs.hbs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. {{#if controller.content.isRestartRequired}}
  21. {{#isAccessible ADMIN}}
  22. <div>
  23. <div class="alert alert-warning clearfix">
  24. <i class="icon-refresh"></i> {{t services.service.config.restartService.needToRestart}} <a
  25. href="#" {{action "showComponentsShouldBeRestarted" controller.content target="controller"}}>{{view.componentsCount}} {{pluralize view.componentsCount singular="t:common.component" plural="t:common.components"}}</a> {{t on}}
  26. <a href="#" {{action "showHostsShouldBeRestarted" controller.content target="controller"}}>{{view.hostsCount}} {{pluralize view.hostsCount singular="t:common.host" plural="t:common.hosts"}}</a>
  27. <span class="restart-components pull-right">&nbsp</span>
  28. <div class="btn-group pull-right">
  29. <button type="button" class="btn btn-default dropdown-toggle btn-warning" data-toggle="dropdown">
  30. {{t hosts.host.details.needToRestart.button}}
  31. <span class="caret"></span>
  32. </button>
  33. <ul class="dropdown-menu">
  34. <li class="restart-all-components">
  35. <a href="#" {{action restartAllStaleConfigComponents target="controller"}}>{{t restart.service.all.affected}}</a>
  36. </li>
  37. {{#if view.rollingRestartSlaveComponentName}}
  38. <li class="restart-slave-components">
  39. <a href="#" {{action rollingRestartStaleConfigSlaveComponents view.rollingRestartSlaveComponentName target="controller"}}>{{view.rollingRestartActionName}}</a>
  40. </li>
  41. {{/if}}
  42. </ul>
  43. </div>
  44. </div>
  45. </div>
  46. {{/isAccessible}}
  47. {{/if}}
  48. <div class="clearfix"></div>
  49. {{view App.ServiceConfigView filterBinding="controller.filter" columnsBinding="controller.filterColumns" canEditBinding="controller.canEdit"}}
  50. {{else}}
  51. <div class="spinner"></div>
  52. {{/if}}
  53. </div>