configs.hbs 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 target="controller"}}>{{view.componentsCount}} {{pluralize view.componentsCount singular="t:common.component" plural="t:common.components"}}</a> {{t on}}
  26. <a href="#" {{action showHostsShouldBeRestarted 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>
  35. <a href="#" {{action restartAllStaleConfigComponents target="controller"}}>{{t restart.service.all}}</a>
  36. </li>
  37. {{#if view.rollingRestartSlaveComponentName}}
  38. <li>
  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.isCurrentSelected" showConfigHistoryFeatureBinding="controller.showConfigHistoryFeature"}}
  50. {{#isAccessible ADMIN}}
  51. {{#unless showConfigHistoryFeature}}
  52. <p class="pull-right">
  53. <!--<input class="btn btn-primary" type="button" value="Save" {{!bindAttr disabled="isSubmitDisabled"}} />-->
  54. <a class="btn" {{action doCancel target="controller"}}>{{t common.cancel}}</a>
  55. <a class="btn btn-primary" {{bindAttr disabled="isSubmitDisabled"}}
  56. {{action restartServicePopup target="controller"}}>{{t common.save}}</a>
  57. </p>
  58. {{/unless}}
  59. {{/isAccessible}}
  60. {{else}}
  61. <div class="spinner"></div>
  62. {{/if}}
  63. </div>