wizard_view.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. var App = require('app');
  19. App.HighAvailabilityWizardView = Em.View.extend({
  20. templateName: require('templates/main/admin/highAvailability/wizard'),
  21. isStep1Disabled: function () {
  22. return this.isStepDisabled(1);
  23. }.property('controller.isStepDisabled.@each.value').cacheable(),
  24. isStep2Disabled: function () {
  25. return this.isStepDisabled(2);
  26. }.property('controller.isStepDisabled.@each.value').cacheable(),
  27. isStep3Disabled: function () {
  28. return this.isStepDisabled(3);
  29. }.property('controller.isStepDisabled.@each.value').cacheable(),
  30. isStep4Disabled: function () {
  31. return this.isStepDisabled(4);
  32. }.property('controller.isStepDisabled.@each.value').cacheable(),
  33. isStep5Disabled: function () {
  34. return this.isStepDisabled(5);
  35. }.property('controller.isStepDisabled.@each.value').cacheable(),
  36. isStep6Disabled: function () {
  37. return this.isStepDisabled(6);
  38. }.property('controller.isStepDisabled.@each.value').cacheable(),
  39. isStep7Disabled: function () {
  40. return this.isStepDisabled(7);
  41. }.property('controller.isStepDisabled.@each.value').cacheable(),
  42. isStep8Disabled: function () {
  43. return this.isStepDisabled(8);
  44. }.property('controller.isStepDisabled.@each.value').cacheable(),
  45. isStepDisabled: function (index) {
  46. return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
  47. }
  48. });