slider_config_widget.hbs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 {{bindAttr class="view.config.isHiddenByFilter:hide :widget :slider-widget"}}>
  19. {{#if view.isOriginalSCP}}
  20. <p class="widget-config-label">{{formatWordBreak view.configLabel}}</p>
  21. {{/if}}
  22. <div {{bindAttr class="view.isOriginalSCP:original-widget :ui-slider-wrapper"}}>
  23. <div class="pull-left ui-slider-wrapper-inner">{{view Ember.TextField valueBinding="view.config.value" class="input-mini slider-input"}}</div>
  24. <div class="pull-right ui-slider-label">{{view.mirrorValue}} {{view.config.stackConfigProperty.valueAttributes.unit}}</div>
  25. </div>
  26. <div class="clearfix">
  27. {{#if view.isOriginalSCP}}
  28. {{view App.RestoreConfigView visibleBinding="view.undoAllowed"}}
  29. {{/if}}
  30. {{#if view.overrideAllowed}}
  31. {{#isAccessible ADMIN}}
  32. <div class="pull-left action-button">
  33. <a class="btn btn-small" href="#" data-toggle="tooltip"
  34. {{action "createOverrideProperty" view.config target="view.parentView"}}
  35. {{translateAttr data-original-title="common.override"}}>
  36. <i class="icon-plus-sign"></i>
  37. </a>
  38. </div>
  39. {{/isAccessible}}
  40. {{/if}}
  41. </div>
  42. {{#if view.isComparison}}
  43. {{#if controller.selectedConfigGroup.isDefault}}
  44. <span
  45. class="label label-info">{{t dashboard.configHistory.table.version.prefix}}{{controller.selectedVersion}}</span>
  46. {{#if controller.isCurrentSelected}}
  47. <span class="label label-success">{{t common.current}}</span>
  48. {{/if}}
  49. {{else}}
  50. <span class="label label-info">{{t common.default}}
  51. &nbsp;{{t services.service.config.configHistory.configGroup}}</span>
  52. {{/if}}
  53. {{/if}}
  54. {{#if view.isOriginalSCP}}
  55. {{view App.SliderConfigWidgetOverrideView
  56. serviceConfigPropertyBinding="view.config"
  57. isDefaultGroupSelectedBinding="controller.selectedConfigGroup.isDefault"
  58. }}
  59. {{/if}}
  60. {{#if view.isComparison}}
  61. {{view App.SliderConfigWidgetComparisonView serviceConfigPropertyBinding="view.config"}}
  62. {{/if}}
  63. </div>