Просмотр исходного кода

AMBARI-13949. Apply created Em.computed macros to ambari-web views (onechiporenko)

Oleg Nechiporenko 9 лет назад
Родитель
Сommit
177a91f405
75 измененных файлов с 176 добавлено и 515 удалено
  1. 1 3
      ambari-web/app/views/common/ajax_default_error_popup_body.js
  2. 1 3
      ambari-web/app/views/common/assign_master_components_view.js
  3. 4 13
      ambari-web/app/views/common/configs/config_history_flow.js
  4. 4 12
      ambari-web/app/views/common/configs/controls_view.js
  5. 1 3
      ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
  6. 1 3
      ambari-web/app/views/common/configs/service_config_layout_tab_view.js
  7. 1 3
      ambari-web/app/views/common/configs/service_config_view.js
  8. 2 6
      ambari-web/app/views/common/configs/widgets/config_widget_view.js
  9. 1 3
      ambari-web/app/views/common/configs/widgets/directory_config_widget_view.js
  10. 1 3
      ambari-web/app/views/common/configs/widgets/plain_config_text_field.js
  11. 1 3
      ambari-web/app/views/common/configs/widgets/test_db_connection_widget_view.js
  12. 2 6
      ambari-web/app/views/common/filter_combo_cleanable.js
  13. 1 3
      ambari-web/app/views/common/filter_combobox.js
  14. 3 11
      ambari-web/app/views/common/form/manage_credentials_form_view.js
  15. 2 6
      ambari-web/app/views/common/grid.js
  16. 1 3
      ambari-web/app/views/common/host_progress_popup_body_view.js
  17. 4 12
      ambari-web/app/views/common/metric.js
  18. 3 9
      ambari-web/app/views/common/modal_popups/invalid_KDC_popup.js
  19. 1 3
      ambari-web/app/views/common/modal_popups/manage_kdc_credentials_popup.js
  20. 1 3
      ambari-web/app/views/common/modal_popups/select_groups_popup.js
  21. 3 6
      ambari-web/app/views/common/rolling_restart_view.js
  22. 3 9
      ambari-web/app/views/common/table_view.js
  23. 3 9
      ambari-web/app/views/common/widget/gauge_widget_view.js
  24. 5 15
      ambari-web/app/views/common/widget/graph_widget_view.js
  25. 1 3
      ambari-web/app/views/main/admin.js
  26. 3 6
      ambari-web/app/views/main/admin/authentication.js
  27. 2 6
      ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step1_view.js
  28. 2 3
      ambari-web/app/views/main/admin/highAvailability/nameNode/step3_view.js
  29. 1 5
      ambari-web/app/views/main/admin/highAvailability/nameNode/step4_view.js
  30. 1 3
      ambari-web/app/views/main/admin/stack_upgrade/upgrade_task_view.js
  31. 1 3
      ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
  32. 2 6
      ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
  33. 1 3
      ambari-web/app/views/main/alert_definitions_view.js
  34. 1 4
      ambari-web/app/views/main/alerts/manage_alert_groups_view.js
  35. 2 6
      ambari-web/app/views/main/alerts/manage_alert_notifications_view.js
  36. 1 3
      ambari-web/app/views/main/dashboard.js
  37. 1 3
      ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js
  38. 4 9
      ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js
  39. 3 9
      ambari-web/app/views/main/dashboard/widgets/hbase_links.js
  40. 3 9
      ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js
  41. 2 6
      ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js
  42. 1 3
      ambari-web/app/views/main/dashboard/widgets/node_managers_live.js
  43. 2 6
      ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
  44. 3 9
      ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
  45. 2 6
      ambari-web/app/views/main/dashboard/widgets/text_widget.js
  46. 5 15
      ambari-web/app/views/main/host.js
  47. 1 3
      ambari-web/app/views/main/host/configs.js
  48. 2 6
      ambari-web/app/views/main/host/details.js
  49. 6 19
      ambari-web/app/views/main/host/details/host_component_view.js
  50. 1 3
      ambari-web/app/views/main/host/host_alerts_view.js
  51. 1 3
      ambari-web/app/views/main/host/stack_versions_view.js
  52. 1 3
      ambari-web/app/views/main/host/summary.js
  53. 3 9
      ambari-web/app/views/main/menu.js
  54. 1 3
      ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graph.js
  55. 5 15
      ambari-web/app/views/main/service/info/summary.js
  56. 3 9
      ambari-web/app/views/main/service/item.js
  57. 6 18
      ambari-web/app/views/main/service/menu.js
  58. 2 6
      ambari-web/app/views/main/service/reassign/step3_view.js
  59. 1 7
      ambari-web/app/views/main/service/reassign/step4_view.js
  60. 4 12
      ambari-web/app/views/main/service/reassign/step7_view.js
  61. 3 6
      ambari-web/app/views/main/service/reconfigure.js
  62. 4 12
      ambari-web/app/views/main/service/service.js
  63. 4 12
      ambari-web/app/views/main/service/services/hbase.js
  64. 4 12
      ambari-web/app/views/main/service/services/hdfs.js
  65. 2 6
      ambari-web/app/views/main/service/services/storm.js
  66. 1 3
      ambari-web/app/views/main/service/services/yarn.js
  67. 7 15
      ambari-web/app/views/wizard/step1_view.js
  68. 4 12
      ambari-web/app/views/wizard/step2_view.js
  69. 2 6
      ambari-web/app/views/wizard/step3/hostLogPopupBody_view.js
  70. 2 6
      ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js
  71. 2 6
      ambari-web/app/views/wizard/step3_view.js
  72. 3 6
      ambari-web/app/views/wizard/step5_view.js
  73. 1 3
      ambari-web/app/views/wizard/step6_view.js
  74. 2 6
      ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js
  75. 4 12
      ambari-web/app/views/wizard/step9_view.js

+ 1 - 3
ambari-web/app/views/common/ajax_default_error_popup_body.js

@@ -59,9 +59,7 @@ App.AjaxDefaultErrorPopupBodyView = Em.View.extend({
    * Indicates if error message should be displayed
    * @type {boolean}
    */
-  showMessage: function () {
-    return !!this.get('message');
-  }.property('message'),
+  showMessage: Em.computed.bool('message'),
 
   /**
    * HTTP response error description

+ 1 - 3
ambari-web/app/views/common/assign_master_components_view.js

@@ -39,9 +39,7 @@ App.AssignMasterComponentsView = Em.View.extend({
    * Otherwise - App.SelectHostView
    * @type {bool}
    */
-  shouldUseInputs: function() {
-    return this.get('controller.hosts.length') > 25;
-  }.property('controller.hosts.length'),
+  shouldUseInputs: Em.computed.gt('controller.hosts.length', 25),
 
   didInsertElement: function () {
     this.get('controller').loadStep();

+ 4 - 13
ambari-web/app/views/common/configs/config_history_flow.js

@@ -27,12 +27,8 @@ App.ConfigHistoryFlowView = Em.View.extend({
   startIndex: 0,
   showLeftArrow: false,
   showRightArrow: false,
-  leftArrowTooltip: function () {
-    return this.get('showLeftArrow') ? Em.I18n.t('services.service.config.configHistory.leftArrow.tooltip') : null;
-  }.property('showLeftArrow'),
-  rightArrowTooltip: function () {
-    return this.get('showRightArrow') ? Em.I18n.t('services.service.config.configHistory.rightArrow.tooltip') : null;
-  }.property('showRightArrow'),
+  leftArrowTooltip: Em.computed.ifThenElse('showLeftArrow', Em.I18n.t('services.service.config.configHistory.leftArrow.tooltip'), null),
+  rightArrowTooltip: Em.computed.ifThenElse('showRightArrow', Em.I18n.t('services.service.config.configHistory.rightArrow.tooltip'), null),
   VERSIONS_IN_FLOW: 6,
   VERSIONS_IN_DROPDOWN: 6,
   /**
@@ -77,9 +73,7 @@ App.ConfigHistoryFlowView = Em.View.extend({
     return (this.get('controller.isSubmitDisabled') || !this.get('controller.versionLoaded') || !this.get('controller.isPropertiesChanged')) ;
   }.property('controller.isSubmitDisabled', 'controller.versionLoaded', 'controller.isPropertiesChanged'),
 
-  serviceName: function () {
-    return this.get('controller.selectedService.serviceName');
-  }.property('controller.selectedService.serviceName'),
+  serviceName: Em.computed.alias('controller.selectedService.serviceName'),
 
   displayedServiceVersion: function () {
     return this.get('serviceVersions').findProperty('isDisplayed');
@@ -87,10 +81,7 @@ App.ConfigHistoryFlowView = Em.View.extend({
   /**
    * identify whether to show link that open whole content of notes
    */
-  showMoreLink: function () {
-    //100 is number of symbols that fit into label
-    return (this.get('displayedServiceVersion.notes.length') > 100);
-  }.property('displayedServiceVersion.notes.length'),
+  showMoreLink: Em.computed.gt('displayedServiceVersion.notes.length', 100),
   /**
    * formatted notes ready to display
    */

+ 4 - 12
ambari-web/app/views/common/configs/controls_view.js

@@ -33,25 +33,17 @@ App.ControlsView = Ember.View.extend({
 		return !this.get('serviceConfigProperty.isEditable') && this.get('serviceConfigProperty.group');
 	}.property('showActions', 'serviceConfigProperty.group'),
 
-	showIsFinal: function() {
-		return this.get('serviceConfigProperty.supportsFinal');
-	}.property('serviceConfigProperty.supportsFinal'),
+	showIsFinal: Em.computed.alias('serviceConfigProperty.supportsFinal'),
 
-	showRemove: function() {
-		return this.get('showActions') && this.get('serviceConfigProperty.isRemovable');
-	}.property('showActions', 'serviceConfigProperty.isRemovable'),
+	showRemove: Em.computed.and('showActions', 'serviceConfigProperty.isRemovable'),
 
-	showOverride: function() {
-		return this.get('showActions') && this.get('serviceConfigProperty.isPropertyOverridable');
-	}.property('showActions', 'serviceConfigProperty.isPropertyOverridable'),
+	showOverride: Em.computed.and('showActions', 'serviceConfigProperty.isPropertyOverridable'),
 
 	showUndo: function() {
 		return this.get('showActions') && !this.get('serviceConfigProperty.cantBeUndone') && this.get('serviceConfigProperty.isNotDefaultValue');
 	}.property('showActions', 'serviceConfigProperty.cantBeUndone', 'serviceConfigProperty.isNotDefaultValue'),
 
-	showSetRecommended: function() {
-		return this.get('showActions') && this.get('serviceConfigProperty.recommendedValueExists');
-	}.property('showActions', 'serviceConfigProperty.recommendedValueExists')
+	showSetRecommended: Em.computed.and('showActions', 'serviceConfigProperty.recommendedValueExists')
 
 });
 

+ 1 - 3
ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js

@@ -34,9 +34,7 @@ App.NotificationsConfigsView = App.ServiceConfigsByCategoryView.extend({
    */
   createNotification: 'no',
 
-  categoryConfigsAll: function () {
-    return this.get('serviceConfigs').filterProperty('filename', 'alert_notification');
-  }.property('serviceConfigs.@each').cacheable(),
+  categoryConfigsAll: Em.computed.filterBy('serviceConfigs', 'filename', 'alert_notification'),
 
   /**
    * @type {string} "tls|ssl"

+ 1 - 3
ambari-web/app/views/common/configs/service_config_layout_tab_view.js

@@ -39,9 +39,7 @@ App.ServiceConfigLayoutTabView = Em.View.extend(App.ConfigOverridable, {
   /**
    * @type {App.Service}
    */
-  service: function () {
-    return this.get('controller.selectedService');
-  }.property('controller.selectedService'),
+  service: Em.computed.alias('controller.selectedService'),
 
   templateName: require('templates/common/configs/service_config_layout_tab'),
 

+ 1 - 3
ambari-web/app/views/common/configs/service_config_view.js

@@ -62,9 +62,7 @@ App.ServiceConfigView = Em.View.extend({
    * Determines if user is on the service configs page
    * @type {boolean}
    */
-  isOnTheServicePage: function () {
-    return this.get('controller.name') === 'mainServiceInfoConfigsController';
-  }.property('controller.name'),
+  isOnTheServicePage: Em.computed.equal('controller.name', 'mainServiceInfoConfigsController'),
 
   classNameBindings: ['isOnTheServicePage:serviceConfigs'],
 

+ 2 - 6
ambari-web/app/views/common/configs/widgets/config_widget_view.js

@@ -63,18 +63,14 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
    * if not, text-field with config value or label "Undefined" should be shown
    * @type {boolean}
    */
-  doNotShowWidget: function() {
-    return this.get('isPropertyUndefined') || this.get('config.showAsTextBox');
-  }.property('isPropertyUndefined', 'config.showAsTextBox'),
+  doNotShowWidget: Em.computed.or('isPropertyUndefined', 'config.showAsTextBox'),
 
   /**
    * defines if property in not defined in selected version
    * in this case "Undefined" should be shown instead of widget
    * @type {boolean}
    */
-  isPropertyUndefined: function() {
-    return this.get('config.value') === "Undefined";
-  }.property('config.value'),
+  isPropertyUndefined: Em.computed.equal('config.value', 'Undefined'),
 
   /**
    * Tab where current widget placed

+ 1 - 3
ambari-web/app/views/common/configs/widgets/directory_config_widget_view.js

@@ -24,9 +24,7 @@ App.DirectoryConfigWidgetView = App.ConfigWidgetView.extend({
   templateName: require('templates/common/configs/widgets/directory_config_widget'),
   classNames: ['widget-config', 'directory-widget'],
 
-  disabled: function() {
-    return !this.get('config.isEditable');
-  }.property('config.isEditable'),
+  disabled: Em.computed.not('config.isEditable'),
 
   /**
    * Control to edit value.

+ 1 - 3
ambari-web/app/views/common/configs/widgets/plain_config_text_field.js

@@ -30,9 +30,7 @@ App.PlainConfigTextField = Ember.View.extend(App.SupportsDependentConfigs, App.W
   classNames: ['widget-config-plain-text-field'],
   placeholderBinding: 'config.savedValue',
 
-  disabled: function() {
-    return !this.get('config.isEditable');
-  }.property('config.isEditable'),
+  disabled: Em.computed.not('config.isEditable'),
 
   configLabel: function() {
     return this.get('config.stackConfigProperty.displayName') || this.get('config.displayName') || this.get('config.name');

+ 1 - 3
ambari-web/app/views/common/configs/widgets/test_db_connection_widget_view.js

@@ -25,9 +25,7 @@ App.TestDbConnectionWidgetView = App.ConfigWidgetView.extend({
   classNames: ['widget'],
 
   /** @property {string} btnCaption - text for button **/
-  btnCaption: function () {
-    return this.get('config.stackConfigProperty.widget.display-name');
-  }.property('config.stackConfigProperty.widget.display-name'),
+  btnCaption: Em.computed.alias('config.stackConfigProperty.widget.display-name'),
   /** @property {string} responseCaption - text for status link **/
   responseCaption: null,
   /** @property {boolean} isConnecting - is request to server activated **/

+ 2 - 6
ambari-web/app/views/common/filter_combo_cleanable.js

@@ -52,18 +52,14 @@ App.FilterComboCleanableView = Ember.View.extend({
     column.set('selected', !column.get('selected'));
   },
 
-  filterNotEmpty: function(target){
-    return (this.get('filter').length > 0);
-  }.property('filter'),
+  filterNotEmpty: Em.computed.gt('filter.length', 0),
 
   /**
    * true if any of filter columns is selected
    * in this case clear filter row should be shown
    * @type {boolean}
    */
-  showClearFilter: function() {
-    return this.get('columns').someProperty('selected');
-  }.property('columns.@each.selected'),
+  showClearFilter: Em.computed.someBy('columns', 'selected', true),
 
   /**
    * clears all filter columns.

+ 1 - 3
ambari-web/app/views/common/filter_combobox.js

@@ -31,9 +31,7 @@ App.FilterComboboxView = Ember.View.extend({
   //filter: '', binding outside
   //columns: [], binding outside
 
-  placeHolder: function(){
-    return this.t('common.combobox.placeholder');
-  }.property(),
+  placeHolder: Em.I18n.t('common.combobox.placeholder'),
 
   /**
    * Onclick handler for dropdown menu

+ 3 - 11
ambari-web/app/views/common/form/manage_credentials_form_view.js

@@ -45,7 +45,7 @@ App.ManageCredentialsFormView = Em.View.extend({
    *
    * @type {boolean}
    */
-  checkboxDisabled: Ember.computed.not('storePersisted'),
+  checkboxDisabled: Em.computed.not('storePersisted'),
 
   /**
    * Credentials can be removed, in case when they stored to persistent secure storage.
@@ -133,22 +133,14 @@ App.ManageCredentialsFormView = Em.View.extend({
     return credentialsUtils.STORE_TYPES.PERSISTENT;
   }.property('storeCredentials'),
 
-  formHeader: function() {
-    return this.get('isRemovable') ?
-      Em.I18n.t('admin.kerberos.credentials.form.header.stored') :
-      Em.I18n.t('admin.kerberos.credentials.form.header.not.stored');
-  }.property('isRemovable'),
+  formHeader: Em.computed.ifThenElse('isRemovable', Em.I18n.t('admin.kerberos.credentials.form.header.stored'), Em.I18n.t('admin.kerberos.credentials.form.header.not.stored')),
 
   /**
    * Message to display in tooltip regarding persistent storage state.
    *
    * @type {string}
    */
-  hintMessage: function() {
-    return this.get('storePersisted') ?
-      Em.I18n.t('admin.kerberos.credentials.store.hint.supported') :
-      Em.I18n.t('admin.kerberos.credentials.store.hint.not.supported');
-  }.property('storePersisted'),
+  hintMessage: Em.computed.ifThenElse('storePersisted', Em.I18n.t('admin.kerberos.credentials.store.hint.supported'), Em.I18n.t('admin.kerberos.credentials.store.hint.not.supported')),
 
   /**
    * Observe changes for principal and password.

+ 2 - 6
ambari-web/app/views/common/grid.js

@@ -31,9 +31,7 @@ App.GridFilter = Em.View.extend({
   getHeader:function () {
     return this.get('header')
   },
-  filters:function () {
-    return this.get('header._filters');
-  }.property('header._filters')
+  filters:Em.computed.alias('header._filters')
 });
 
 App.GridHeader = Em.View.extend({
@@ -108,9 +106,7 @@ App.GridRow = Em.View.extend({
 });
 
 App.GridPage = Em.Object.extend({
-  activeClass:function () {
-    return this.get('active') ? "active" : "";
-  }.property('active'),
+  activeClass:Em.computed.ifThenElse('active', 'active', ''),
   active:function () {
     return parseInt(this.get('number')) == parseInt(this.get('pager.grid.currentPage'));
   }.property('pager.grid.currentPage')

+ 1 - 3
ambari-web/app/views/common/host_progress_popup_body_view.js

@@ -197,9 +197,7 @@ App.HostProgressPopupBodyView = App.TableView.extend({
   /**
    * @type {boolean}
    */
-  isHostEmptyList: function () {
-    return !this.get('pageContent.length');
-  }.property('pageContent.length'),
+  isHostEmptyList: Em.computed.empty('pageContent'),
 
   /**
    * @type {wrappedHost}

+ 4 - 12
ambari-web/app/views/common/metric.js

@@ -108,23 +108,15 @@ App.MetricFilteringWidget = Em.View.extend({
   itemView:Em.View.extend({
     tagName:'li',
     classNameBindings:['disabled'],
-    disabled:function () {
-      return this.get('isActive') ? "disabled" : false;
-    }.property('isActive'),
-    isActive:function () {
-      return this.get('metric.value') == this.get('widget.chosenMetric');
-    }.property('widget.chosenMetric'),
-    label:function () {
-      return this.get('metric.label');
-    }.property('metric.label'),
+    disabled:Em.computed.ifThenElse('isActive', 'disabled', false),
+    isActive:Em.computed.equalProperties('metric.value', 'widget.chosenMetric'),
+    label:Em.computed.alias('metric.label'),
     template:Em.Handlebars.compile('<a {{action activate view.metric.value target="view.widget" href="#" }}>{{unbound view.label}}</a>')
   }),
 
   moreItemView:function () {
     return this.get('itemView').extend({
-      label:function () {
-        return this.get('metric.value');
-      }.property('metric.value')
+      label:Em.computed.alias('metric.value')
     });
   }.property(),
 

+ 3 - 9
ambari-web/app/views/common/modal_popups/invalid_KDC_popup.js

@@ -51,27 +51,21 @@ App.showInvalidKDCPopup = function (ajaxOpt, message) {
      *
      * @type {boolean}
      */
-    checkboxDisabled: Ember.computed.not('storePersisted'),
+    checkboxDisabled: Em.computed.not('storePersisted'),
 
     /**
      * Returns storage type used to save credentials e.g. <b>persistent</b>, <b>temporary</b> (default)
      *
      * @type {string}
      */
-    storageType: function() {
-      return this.get('storeCredentials') ? credentialsUtils.STORE_TYPES.PERSISTENT : credentialsUtils.STORE_TYPES.TEMPORARY;
-    }.property('storeCredentials'),
+    storageType: Em.computed.ifThenElse('storeCredentials', credentialsUtils.STORE_TYPES.PERSISTENT, credentialsUtils.STORE_TYPES.TEMPORARY),
 
     /**
      * Message to display in tooltip regarding persistent storage state.
      *
      * @type {string}
      */
-    hintMessage: function() {
-      return this.get('storePersisted') ?
-        Em.I18n.t('admin.kerberos.credentials.store.hint.supported') :
-        Em.I18n.t('admin.kerberos.credentials.store.hint.not.supported');
-    }.property('storePersisted'),
+    hintMessage: Em.computed.ifThenElse('storePersisted', Em.I18n.t('admin.kerberos.credentials.store.hint.supported'), Em.I18n.t('admin.kerberos.credentials.store.hint.not.supported')),
 
     bodyClass: Em.View.extend({
       warningMsg: message + Em.I18n.t('popup.invalid.KDC.msg'),

+ 1 - 3
ambari-web/app/views/common/modal_popups/manage_kdc_credentials_popup.js

@@ -36,9 +36,7 @@ App.showManageCredentialsPopup = function () {
 
     isCredentialsRemoved: false,
 
-    disablePrimary: function() {
-      return this.get('formView.isSubmitDisabled');
-    }.property('formView.isSubmitDisabled'),
+    disablePrimary: Em.computed.alias('formView.isSubmitDisabled'),
 
     formView: function() {
       return this.get('childViews').findProperty('viewName', 'manageCredentialsForm');

+ 1 - 3
ambari-web/app/views/common/modal_popups/select_groups_popup.js

@@ -45,9 +45,7 @@ App.showSelectGroupsPopup = function (selectedServiceName, selectedConfigGroup,
         didInsertElement: function() {
           this.set('selectedGroup', this.get('parentView.parentView.selectedConfigGroup.dependentConfigGroups')[this.get('serviceName')]);
         },
-        serviceName: function() {
-          return this.get('content').get('serviceName');
-        }.property('content'),
+        serviceName: Em.computed.alias('content.serviceName'),
         selectedGroup: null,
         updateGroup: function() {
           var dependentGroups = $.extend({},this.get('parentView.parentView.selectedConfigGroup.dependentConfigGroups'));

+ 3 - 6
ambari-web/app/views/common/rolling_restart_view.js

@@ -174,17 +174,14 @@ App.RollingRestartView = Em.View.extend({
    * List of host components without components in out-of-service state
    * @type {Array}
    */
-  nonMaintainanceHostComponents : function() {
-    return this.get('allHostComponents').filterProperty('passiveState', 'OFF')
-  }.property('allHostComponents', 'allHostComponents.@each.passiveState'),
+  nonMaintainanceHostComponents : Em.computed.filterBy('allHostComponents', 'passiveState', 'OFF'),
 
   /**
    * List of host components with host in Maintenance mode
    * @type {Array}
    */
-  componentsWithMaintenanceHost: function() {
-    return this.get('allHostComponents').filterProperty('hostPassiveState', 'ON');
-  }.property('allHostComponents', 'allHostComponents.@each.hostPassiveState'),
+  componentsWithMaintenanceHost: Em.computed.filterBy('allHostComponents', 'hostPassiveState', 'ON'),
+
   /**
    * List of host components without components in out-of-service state
    * If <code>staleConfigsOnly</code> is true, components with <code>staleConfigs</code> = false are also filtered

+ 3 - 9
ambari-web/app/views/common/table_view.js

@@ -62,16 +62,12 @@ App.TableView = Em.View.extend(App.UserPref, {
   /**
    * number of items in table after applying filters
    */
-  filteredCount: function () {
-    return this.get('filteredContent.length');
-  }.property('filteredContent.length'),
+  filteredCount: Em.computed.alias('filteredContent.length'),
 
   /**
    * total number of items in table before applying filters
    */
-  totalCount: function () {
-    return this.get('content.length');
-  }.property('content.length'),
+  totalCount: Em.computed.alias('content.length'),
 
   /**
    * Do filtering, using saved in the local storage filter conditions
@@ -408,9 +404,7 @@ App.TableView = Em.View.extend(App.UserPref, {
    * Determine if <code>filteredContent</code> is empty or not
    * @type {Boolean}
    */
-  hasFilteredItems: function() {
-    return !!this.get('filteredCount');
-  }.property('filteredCount'),
+  hasFilteredItems: Em.computed.bool('filteredCount'),
 
   /**
    * Contains content to show on the current page of data page view

+ 3 - 9
ambari-web/app/views/common/widget/gauge_widget_view.js

@@ -77,22 +77,16 @@ App.GaugeWidgetView = Em.View.extend(App.WidgetMixin, {
      */
     MAX_VALUE: 100,
 
-    warningThreshold: function(){
-      return this.get('parentView.content.properties.warning_threshold');
-    }.property('parentView.content.properties.warning_threshold'),
+    warningThreshold: Em.computed.alias('parentView.content.properties.warning_threshold'),
 
-    errorThreshold: function(){
-      return this.get('parentView.content.properties.error_threshold');
-    }.property('parentView.content.properties.error_threshold'),
+    errorThreshold: Em.computed.alias('parentView.content.properties.error_threshold'),
 
     id: function() {
       return 'gauge-widget-' + this.get('parentView.content.id');
     }.property('parentView.content.id'),
 
     existCenterText: true,
-    centerTextColor: function () {
-      return this.get('contentColor');
-    }.property('contentColor'),
+    centerTextColor: Em.computed.alias('contentColor'),
 
     palette: new Rickshaw.Color.Palette({
       scheme: [ '#FFFFFF', '#D6DDDF'].reverse()

+ 5 - 15
ambari-web/app/views/common/widget/graph_widget_view.js

@@ -71,9 +71,7 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, {
    */
   data: [],
 
-  exportTargetView: function () {
-    return this.get('childViews.lastObject');
-  }.property(),
+  exportTargetView: Em.computed.alias('childViews.lastObject'),
 
   drawWidget: function () {
     if (this.get('isLoaded')) {
@@ -222,15 +220,9 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, {
 
     noTitleUnderGraph: true,
     inWidget: true,
-    description: function () {
-      return this.get('parentView.content.description');
-    }.property('parentView.content.description'),
-    isPreview: function () {
-      return this.get('parentView.isPreview');
-    }.property('parentView.isPreview'),
-    displayUnit: function () {
-      return this.get('parentView.content.properties.display_unit');
-    }.property('parentView.content.properties.display_unit'),
+    description: Em.computed.alias('parentView.content.description'),
+    isPreview: Em.computed.alias('parentView.isPreview'),
+    displayUnit: Em.computed.alias('parentView.content.properties.display_unit'),
     setYAxisFormatter: function () {
       var displayUnit = this.get('displayUnit');
       if (displayUnit) {
@@ -271,9 +263,7 @@ App.GraphWidgetView = Em.View.extend(App.WidgetMixin, App.ExportMetricsMixin, {
       return this.get('parentView.content.properties.graph_type') === 'STACK' ? 'area' : 'line';
     }.property('parentView.content.properties.graph_type'),
 
-    title: function () {
-      return this.get('parentView.content.widgetName');
-    }.property('parentView.content.widgetName'),
+    title: Em.computed.alias('parentView.content.widgetName'),
 
     transformToSeries: function (seriesData) {
       var seriesArray = [];

+ 1 - 3
ambari-web/app/views/main/admin.js

@@ -46,9 +46,7 @@ App.MainAdminView = Em.View.extend({
   NavItemView: Ember.View.extend({
     tagName: 'li',
     classNameBindings: 'isActive:active'.w(),
-    isActive: function () {
-      return this.get('item') === this.get('parentView.selected');
-    }.property('item', 'parentView.selected')
+    isActive: Em.computed.equalProperties('item', 'parentView.selected')
   }),
 
   willDestroyElement: function () {

+ 3 - 6
ambari-web/app/views/main/admin/authentication.js

@@ -31,11 +31,8 @@ App.MainAdminAuthenticationView = Em.View.extend({
     this.pushAuthenticationToForm();
   },
 
-  ldapChecked:function () {
-    return this.get('form.field.method.value');
-  }.property('form.field.method.value'),
+  ldapChecked: Em.computed.alias('form.field.method.value'),
+
+  useCredentials: Em.computed.alias('form.field.bindMethod.value')
 
-  useCredentials:function () {
-    return this.get('form.field.bindMethod.value');
-  }.property('form.field.bindMethod.value')
 });

+ 2 - 6
ambari-web/app/views/main/admin/highAvailability/nameNode/rollbackHA/step1_view.js

@@ -64,13 +64,9 @@ App.RollbackHighAvailabilityWizardStep1View = Em.View.extend({
     this.loadHostsName();
   },
 
-  tipAddNNHost: function () {
-    return this.get('controller.content.addNNHost');
-  }.property('controller.content.addNNHost'),
+  tipAddNNHost: Em.computed.alias('controller.content.addNNHost'),
 
-  tipSNNHost: function () {
-    return this.get('controller.content.sNNHost');
-  }.property('controller.content.sNNHost'),
+  tipSNNHost: Em.computed.alias('controller.content.sNNHost'),
 
   done: function () {
     this.get('controller.content').set('selectedSNNHost', this.get('selectedSNNHost'));

+ 2 - 3
ambari-web/app/views/main/admin/highAvailability/nameNode/step3_view.js

@@ -34,8 +34,7 @@ App.HighAvailabilityWizardStep3View = Em.View.extend({
   secondaryNameNode: function () {
     return this.get('controller.content.masterComponentHosts').findProperty('component', "SECONDARY_NAMENODE").hostName;
   }.property('controller.content.masterComponentHosts'),
-  journalNodes: function () {
-    return this.get('controller.content.masterComponentHosts').filterProperty('component', "JOURNALNODE");
-  }.property('controller.content.masterComponentHosts')
+
+  journalNodes: Em.computed.filterBy('controller.content.masterComponentHosts', 'component', 'JOURNALNODE')
 
 });

+ 1 - 5
ambari-web/app/views/main/admin/highAvailability/nameNode/step4_view.js

@@ -32,10 +32,6 @@ App.HighAvailabilityWizardStep4View = Em.View.extend({
     return Em.I18n.t('admin.highAvailability.wizard.step4.body').format(this.get('controller.content.hdfsUser'), nN.hostName);
   }.property('controller.content.masterComponentHosts'),
 
-  nnCheckPointText: function () {
-    return (this.get('controller.isNextEnabled')) ?
-      Em.I18n.t('admin.highAvailability.wizard.step4.ckCreated') :
-      Em.I18n.t('admin.highAvailability.wizard.step4.ckNotCreated');
-  }.property('controller.isNextEnabled')
+  nnCheckPointText: Em.computed.ifThenElse('controller.isNextEnabled', Em.I18n.t('admin.highAvailability.wizard.step4.ckCreated'), Em.I18n.t('admin.highAvailability.wizard.step4.ckNotCreated'))
 
 });

+ 1 - 3
ambari-web/app/views/main/admin/stack_upgrade/upgrade_task_view.js

@@ -31,9 +31,7 @@ App.upgradeTaskView = Em.View.extend({
   /**
    * @type {boolean}
    */
-  showContent: function () {
-    return this.get('outsideView') || this.get('content.isExpanded');
-  }.property('content.isExpanded', 'outsideView'),
+  showContent: Em.computed.or('outsideView', 'content.isExpanded'),
 
   /**
    * @type {boolean}

+ 1 - 3
ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js

@@ -68,9 +68,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
   /**
    * @type {boolean}
    */
-  isOutOfSync: function () {
-    return this.get('content.status') === 'OUT_OF_SYNC';
-  }.property('content.status'),
+  isOutOfSync: Em.computed.equal('content.status', 'OUT_OF_SYNC'),
 
   /**
    * map containing version (id, label)

+ 2 - 6
ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js

@@ -194,17 +194,13 @@ App.upgradeWizardView = Em.View.extend({
    * manualItem: indicate whether the step is "Service check failures", a dialog with instructions will show up for manual steps
    * @type {boolean}
    */
-  isServiceCheckFailuresItem: function () {
-    return this.get('manualItem.context') === this.get("controller.serviceCheckFailuresContext");
-  }.property('manualItem.context'),
+  isServiceCheckFailuresItem: Em.computed.equalProperties('manualItem.context', 'controller.serviceCheckFailuresContext'),
 
   /**
    * manualItem: indicate whether the step is Finalize
    * @type {boolean}
    */
-  isFinalizeItem: function () {
-    return this.get('manualItem.context') === this.get('controller.finalizeContext');
-  }.property('manualItem.context'),
+  isFinalizeItem: Em.computed.equalProperties('manualItem.context', 'controller.finalizeContext'),
 
   /**
    * label of Upgrade status

+ 1 - 3
ambari-web/app/views/main/alert_definitions_view.js

@@ -75,9 +75,7 @@ App.MainAlertDefinitionsView = App.TableView.extend({
   /**
    * @type {number}
    */
-  totalCount: function () {
-    return this.get('content.length');
-  }.property('content.length'),
+  totalCount: Em.computed.alias('content.length'),
 
   colPropAssoc: ['', 'label', 'summary', 'serviceName', 'type', 'lastTriggered', 'enabled', 'groups'],
 

+ 1 - 4
ambari-web/app/views/main/alerts/manage_alert_groups_view.js

@@ -99,10 +99,7 @@ App.MainAlertsManageAlertGroupView = Em.View.extend({
    * Tooltip for "Remove group"-button
    * @type {string}
    */
-  removeButtonTooltip: function () {
-    return this.get('controller.isRemoveButtonDisabled') ? Em.I18n.t('alerts.actions.manage_alert_groups_popup.removeButtonDisabled') :
-        Em.I18n.t('alerts.actions.manage_alert_groups_popup.removeButton');
-  }.property('controller.isRemoveButtonDisabled'),
+  removeButtonTooltip: Em.computed.ifThenElse('controller.isRemoveButtonDisabled', Em.I18n.t('alerts.actions.manage_alert_groups_popup.removeButtonDisabled'), Em.I18n.t('alerts.actions.manage_alert_groups_popup.removeButton')),
 
   /**
    * Tooltip for "Rename"-button

+ 2 - 6
ambari-web/app/views/main/alerts/manage_alert_notifications_view.js

@@ -43,17 +43,13 @@ App.ManageAlertNotificationsView = Em.View.extend({
    * Show EMAIL information if selected alert notification has type EMAIL
    * @type {boolean}
    */
-  showEmailDetails: function () {
-    return this.get('controller.selectedAlertNotification.type') === 'EMAIL';
-  }.property('controller.selectedAlertNotification.type'),
+  showEmailDetails: Em.computed.equal('controller.selectedAlertNotification.type', 'EMAIL'),
 
   /**
    * Show SNMP information if selected alert notification has type SNMP
    * @type {boolean}
    */
-  showSNMPDetails: function () {
-    return this.get('controller.selectedAlertNotification.type') === 'SNMP';
-  }.property('controller.selectedAlertNotification.type'),
+  showSNMPDetails: Em.computed.equal('controller.selectedAlertNotification.type', 'SNMP'),
 
   email: function () {
     return this.get('controller.selectedAlertNotification.properties')['ambari.dispatch.recipients'];

+ 1 - 3
ambari-web/app/views/main/dashboard.js

@@ -45,9 +45,7 @@ App.MainDashboardView = Em.View.extend({
   NavItemView: Ember.View.extend({
     tagName: 'li',
     classNameBindings: 'isActive:active'.w(),
-    isActive: function () {
-      return this.get('item') === this.get('parentView.selected');
-    }.property('item', 'parentView.selected'),
+    isActive: Em.computed.equalProperties('item', 'parentView.selected'),
     elementId: Ember.computed(function(){
       var label = Em.get(this, 'templateData.keywords.category.label');
       return label ? 'dashboard-view-tab-' + label.toLowerCase().replace(/\s/g, '-') : "";

+ 1 - 3
ambari-web/app/views/main/dashboard/widgets/flume_agent_live.js

@@ -40,9 +40,7 @@ App.FlumeAgentUpView = App.TextDashboardWidgetView.extend({
   thresh2: 70,
   maxValue: 100,
 
-  flumeAgentComponents: function() {
-    return this.get('model.hostComponents').filterProperty('componentName', 'FLUME_HANDLER');
-  }.property('model.hostComponents.length'),
+  flumeAgentComponents: Em.computed.filterBy('model.hostComponents', 'componentName', 'FLUME_HANDLER'),
 
   /**
    * @type {Array}

+ 4 - 9
ambari-web/app/views/main/dashboard/widgets/hbase_average_load.js

@@ -34,12 +34,9 @@ App.HBaseAverageLoadView = App.TextDashboardWidgetView.extend({
     return result;
   }.property("model.averageLoad"),
 
-  isGreen: function () {
-    return this.get('data') <= this.get('thresh1');
-  }.property('data','thresh1','thresh2'),
-  isRed: function () {
-    return this.get('data') > this.get('thresh2');
-  }.property('data','thresh1','thresh2'),
+  isGreen: Em.computed.lteProperties('data', 'thresh1'),
+  isRed: Em.computed.gtProperties('data', 'thresh2'),
+
   isNA: function (){
     return this.get('data') === null || isNaN(this.get('data'));
   }.property('data'),
@@ -48,9 +45,7 @@ App.HBaseAverageLoadView = App.TextDashboardWidgetView.extend({
   thresh2: 2,
   maxValue: 'infinity',
 
-  data: function () {
-    return this.get('model.averageLoad');
-  }.property("model.averageLoad"),
+  data: Em.computed.alias('model.averageLoad'),
 
   content: function (){
     if(this.get('data') || this.get('data') == 0){

+ 3 - 9
ambari-web/app/views/main/dashboard/widgets/hbase_links.js

@@ -33,21 +33,15 @@ App.HBaseLinksView = App.LinkDashboardWidgetView.extend({
   /**
    * All master components
    */
-  masters: function () {
-    return this.get('model.hostComponents').filterProperty('isMaster', true);
-  }.property('model.hostComponents.@each'),
+  masters: Em.computed.filterBy('model.hostComponents', 'isMaster', true),
   /**
    * Passive master components
    */
-  passiveMasters: function () {
-    return this.get('masters').filterProperty('haStatus', 'false');
-  }.property('masters'),
+  passiveMasters: Em.computed.filterBy('masters', 'haStatus', 'false'),
   /**
    * One(!) active master component
    */
-  activeMaster: function () {
-    return this.get('masters').findProperty('haStatus', 'true');
-  }.property('masters'),
+  activeMaster: Em.computed.findBy('masters', 'haStatus', 'true'),
 
   activeMasterTitle: function(){
     return this.t('service.hbase.activeMaster');

+ 3 - 9
ambari-web/app/views/main/dashboard/widgets/hbase_regions_in_transition.js

@@ -32,15 +32,11 @@ App.HBaseRegionsInTransitionView = App.TextDashboardWidgetView.extend({
   }.property("model.regionsInTransition"),
 
   classNameBindings: ['isRed', 'isOrange', 'isGreen', 'isNA'],
-  isGreen: function () {
-    return this.get('data') <= this.get('thresh1');
-  }.property('data','thresh1'),
+  isGreen: Em.computed.lteProperties('data', 'thresh1'),
   isOrange: function () {
     return (this.get('data') <= this.get('thresh2') && this.get('data') > this.get('thresh1') );
   }.property('data','thresh1','thresh2'),
-  isRed: function () {
-    return this.get('data') > this.get('thresh2');
-  }.property('data','thresh2'),
+  isRed: Em.computed.gtProperties('data', 'thresh2'),
   isNA: function () {
     return this.get('data') === null;
   }.property('data'),
@@ -49,9 +45,7 @@ App.HBaseRegionsInTransitionView = App.TextDashboardWidgetView.extend({
   thresh2: 2,
   maxValue: 'infinity',
 
-  data: function () {
-    return this.get('model.regionsInTransition');
-  }.property("model.regionsInTransition"),
+  data: Em.computed.alias('model.regionsInTransition'),
 
   content: function (){
     return this.get('data') + "";

+ 2 - 6
ambari-web/app/views/main/dashboard/widgets/namenode_rpc.js

@@ -35,13 +35,9 @@ App.NameNodeRpcView = App.TextDashboardWidgetView.extend({
   thresh2: 2,
   maxValue: 'infinity',
 
-  isGreen: function () {
-    return (this.get('data') <= this.get('thresh1'));
-  }.property('data','thresh1'),
+  isGreen: Em.computed.lteProperties('data', 'thresh1'),
 
-  isRed: function () {
-    return (this.get('data') > this.get('thresh2'));
-  }.property('data','thresh2'),
+  isRed: Em.computed.gtProperties('data', 'thresh2'),
 
   data: function () {
     if (this.get('model.nameNodeRpc')) {

+ 1 - 3
ambari-web/app/views/main/dashboard/widgets/node_managers_live.js

@@ -50,9 +50,7 @@ App.NodeManagersLiveView = App.TextDashboardWidgetView.extend({
     return !this.get('model.metricsNotAvailable') &&  App.get('router.clusterController.isComponentsStateLoaded');
   }.property('App.router.clusterController.isComponentsStateLoaded'),
 
-  nodeManagersLive: function () {
-    return this.get('model.nodeManagersCountActive');
-  }.property('model.nodeManagersCountActive'),
+  nodeManagersLive: Em.computed.alias('model.nodeManagersCountActive'),
 
   data: function () {
     var nodeManagers = this.get('model.nodeManagersTotal');

+ 2 - 6
ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js

@@ -83,18 +83,14 @@ App.PieChartDashboardWidgetView = App.DashboardWidgetView.extend({
 
   content: App.ChartPieView.extend({
     model: null,  //data bind here
-    id: function() {
-      return this.get('parentView.widgetHtmlId');
-    }.property('parentView.widgetHtmlId'), // html id
+    id: Em.computed.alias('parentView.widgetHtmlId'), // html id
     stroke: '#D6DDDF', //light grey
     thresh1: null, //bind from parent
     thresh2: null,
     innerR: 25,
 
     existCenterText: true,
-    centerTextColor: function () {
-      return this.get('contentColor');
-    }.property('contentColor'),
+    centerTextColor: Em.computed.alias('contentColor'),
 
     palette: new Rickshaw.Color.Palette({
       scheme: [ '#FFFFFF', '#D6DDDF'].reverse()

+ 3 - 9
ambari-web/app/views/main/dashboard/widgets/supervisor_live.js

@@ -40,17 +40,11 @@ App.SuperVisorUpView = App.TextDashboardWidgetView.extend({
   thresh2: 70,
   maxValue: 100,
 
-  superVisorsLive: function () {
-    return this.get('model.superVisorsStarted');
-  }.property('model.superVisorsStarted'),
+  superVisorsLive: Em.computed.alias('model.superVisorsStarted'),
 
-  superVisorsDead: function () {
-    return this.get('model.superVisorsInstalled');
-  }.property('model.superVisorsInstalled'),
+  superVisorsDead: Em.computed.alias('model.superVisorsInstalled'),
 
-  superVisorsTotal: function() {
-    return this.get('model.superVisorsTotal');
-  }.property('model.superVisorsTotal'),
+  superVisorsTotal: Em.computed.alias('model.superVisorsTotal'),
 
   data: function () {
     if ( !this.get('superVisorsTotal') || Em.isNone(this.get('superVisorsLive'))) {

+ 2 - 6
ambari-web/app/views/main/dashboard/widgets/text_widget.js

@@ -25,17 +25,13 @@ App.TextDashboardWidgetView = App.DashboardWidgetView.extend({
 
   classNameBindings: ['isRed', 'isOrange', 'isGreen', 'isNA'],
 
-  isRed: function () {
-    return (this.get('data') <= this.get('thresh1'));
-  }.property('data','thresh1'),
+  isRed: Em.computed.lteProperties('data', 'thresh1'),
 
   isOrange: function () {
     return (this.get('data') <= this.get('thresh2') && this.get('data') > this.get('thresh1'));
   }.property('data','thresh1','thresh2'),
 
-  isGreen: function () {
-    return (this.get('data') > this.get('thresh2'));
-  }.property('data','thresh2'),
+  isGreen: Em.computed.gtProperties('data', 'thresh2'),
 
   isNA: function () {
     return this.get('data') === null;

+ 5 - 15
ambari-web/app/views/main/host.js

@@ -64,9 +64,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
   /**
    * flag to toggle displaying selected hosts counter
    */
-  showSelectedFilter: function () {
-    return this.get('selectedHosts.length') > 0;
-  }.property('selectedHosts'),
+  showSelectedFilter: Em.computed.bool('selectedHosts.length'),
 
   /**
    * return filtered number of all content number information displayed on the page footer bar
@@ -434,9 +432,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
      * true if host has no components
      * @returns {Boolean}
      */
-    hasNoComponents: function() {
-      return !this.get('content.hostComponents.length');
-    }.property('content.hostComponents.length'),
+    hasNoComponents: Em.computed.empty('content.hostComponents'),
 
     /**
 
@@ -554,9 +550,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
      * Add "active" class for category span-wrapper if current category is selected
      * @type {String}
      */
-    itemClass: function() {
-      return this.get('isActive') ? 'active' : '';
-    }.property('isActive'),
+    itemClass: Em.computed.ifThenElse('isActive', 'active', ''),
 
     /**
      * Text shown on the right of category icon
@@ -583,9 +577,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
   /**
    * Category for <code>selected</code> property of each App.Host
    */
-  selectedCategory: function() {
-    return this.get('categories').findProperty('selected', true);
-  }.property('categories.@each.selected'),
+  selectedCategory: Em.computed.findBy('categories', 'selected', true),
 
   statusFilter: Em.View.extend({
     column: 0,
@@ -978,9 +970,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
    * associations between host property and column index
    * @type {Array}
    */
-  colPropAssoc: function () {
-    return this.get('controller.colPropAssoc');
-  }.property('controller.colPropAssoc'),
+  colPropAssoc: Em.computed.alias('controller.colPropAssoc'),
 
   /**
    * Run <code>clearFilter</code> in the each child filterView

+ 1 - 3
ambari-web/app/views/main/host/configs.js

@@ -26,8 +26,6 @@ App.MainHostConfigsView = Em.View.extend({
     return App.router.get('mainHostDetailsController.content');
   }.property('App.router.mainHostDetailsController.content'),
 
-  isConfigAvailable: function () {
-    return !!this.get('content.hostComponents.length');
-  }.property('content.hostComponents.length')
+  isConfigAvailable: Em.computed.bool('content.hostComponents.length')
 
 });

+ 2 - 6
ambari-web/app/views/main/host/details.js

@@ -31,9 +31,7 @@ App.MainHostDetailsView = Em.View.extend({
     return App.router.get('mainHostDetailsController.content');
   }.property('App.router.mainHostDetailsController.content'),
 
-  clients: function () {
-    return this.get('content.hostComponents').filterProperty('isClient');
-  }.property('content.hostComponents.@each'),
+  clients: Em.computed.filterBy('content.hostComponents', 'isClient', true),
 
   clientsWithConfigs: function() {
     return this.get('content.hostComponents').filterProperty('isClient').filter(function(client) {
@@ -41,9 +39,7 @@ App.MainHostDetailsView = Em.View.extend({
     });
   }.property('content.hostComponents.@each'),
 
-  isActive: function() {
-    return this.get('controller.content.passiveState') === "OFF";
-  }.property('controller.content.passiveState'),
+  isActive: Em.computed.equal('controller.content.passiveState', 'OFF'),
 
   maintenance: function(){
     var onOff = this.get('isActive') ? "On" : "Off";

+ 6 - 19
ambari-web/app/views/main/host/details/host_component_view.js

@@ -130,33 +130,25 @@ App.HostComponentView = Em.View.extend({
    * For Started and Starting states
    * @type {bool}
    */
-  isStart: function () {
-    return [App.HostComponentStatus.started, App.HostComponentStatus.starting].contains(this.get('workStatus'));
-  }.property('workStatus'),
+  isStart: Em.computed.existsIn('workStatus', [App.HostComponentStatus.started, App.HostComponentStatus.starting]),
 
   /**
    * For Installed state
    * @type {bool}
    */
-  isStop: function () {
-    return (this.get('workStatus') == App.HostComponentStatus.stopped);
-  }.property('workStatus'),
+  isStop: Em.computed.equal('workStatus', App.HostComponentStatus.stopped),
 
   /**
    * For Installing state
    * @type {bool}
    */
-  isInstalling: function () {
-    return (this.get('workStatus') == App.HostComponentStatus.installing);
-  }.property('workStatus'),
+  isInstalling: Em.computed.equal('workStatus', App.HostComponentStatus.installing),
 
   /**
    * For Init state
    * @type {bool}
    */
-  isInit: function() {
-    return this.get('workStatus') == App.HostComponentStatus.init;
-  }.property('workStatus'),
+  isInit: Em.computed.equal('workStatus', App.HostComponentStatus.init),
 
   /**
    * No action available while component is starting/stopping/unknown
@@ -172,18 +164,13 @@ App.HostComponentView = Em.View.extend({
    * For Stopping or Starting states
    * @type {bool}
    */
-  isInProgress: function () {
-    return (this.get('workStatus') === App.HostComponentStatus.stopping ||
-      this.get('workStatus') === App.HostComponentStatus.starting);
-  }.property('workStatus'),
+  isInProgress: Em.computed.existsIn('workStatus', [App.HostComponentStatus.stopping, App.HostComponentStatus.starting]),
 
   /**
    * For OFF <code>passiveState</code> of host component
    * @type {bool}
    */
-  isActive: function () {
-    return (this.get('content.passiveState') == "OFF");
-  }.property('content.passiveState'),
+  isActive: Em.computed.equal('content.passiveState', 'OFF'),
 
   /**
    * Shows whether we need to show Delete button

+ 1 - 3
ambari-web/app/views/main/host/host_alerts_view.js

@@ -61,9 +61,7 @@ App.MainHostAlertsView = App.TableView.extend({
   /**
    * @type {number}
    */
-  totalCount: function () {
-    return this.get('content.length');
-  }.property('content.length'),
+  totalCount: Em.computed.alias('content.length'),
 
   colPropAssoc: ['', 'serviceName', 'label', 'latestTimestamp', 'state', 'text'],
 

+ 1 - 3
ambari-web/app/views/main/host/stack_versions_view.js

@@ -34,9 +34,7 @@ App.MainHostStackVersionsView = App.TableView.extend({
   /**
    * @type {Ember.Array}
    */
-  content: function () {
-    return this.get('host.stackVersions').filterProperty('isVisible', true);
-  }.property('host.stackVersions.length'),
+  content: Em.computed.filterBy('host.stackVersions', 'isVisible', true),
 
   /**
    * return filtered number of all content number information displayed on the page footer bar

+ 1 - 3
ambari-web/app/views/main/host/summary.js

@@ -230,9 +230,7 @@ App.MainHostSummaryView = Em.View.extend(App.TimeRangeMixin, {
    * If host lost heartbeat, components can't be added on it
    * @type {bool}
    */
-  isAddComponent: function () {
-    return this.get('content.healthClass') !== 'health-status-DEAD-YELLOW';
-  }.property('content.healthClass'),
+  isAddComponent: Em.computed.notEqual('content.healthClass', 'health-status-DEAD-YELLOW'),
 
   /**
    * Disable "Add" button if components can't be added to the current host

+ 3 - 9
ambari-web/app/views/main/menu.js

@@ -94,12 +94,8 @@ App.MainMenuView = Em.CollectionView.extend({
       var itemsWithDropdown = ['services', 'admin', 'views'];
       return itemsWithDropdown.contains(item);
     }.property(''),
-    isAdminItem: function () {
-      return this.get('content').routing == 'admin';
-    }.property(''),
-    isServicesItem: function () {
-      return this.get('content').routing == 'services';
-    }.property(''),
+    isAdminItem: Em.computed.equal('content.routing', 'admin'),
+    isServicesItem: Em.computed.equal('content.routing', 'services'),
     isViewsItem: function () {
       return this.get('content').routing.contains('views');
     }.property(''),
@@ -147,9 +143,7 @@ App.MainMenuView = Em.CollectionView.extend({
     AdminDropdownItemView: Ember.View.extend({
       tagName: 'li',
       classNameBindings: 'isActive:active'.w(),
-      isActive: function () {
-        return this.get('item') === this.get('parentView.selectedAdminItem');
-      }.property('item', 'parentView.selectedAdminItem'),
+      isActive: Em.computed.equalProperties('item', 'parentView.selectedAdminItem'),
 
       goToCategory: function (event) {
         var itemName = this.get('parentView').get('content').routing;

+ 1 - 3
ambari-web/app/views/main/service/info/metrics/flume/flume_metric_graph.js

@@ -39,9 +39,7 @@ App.ChartServiceFlumeMetricGraph = App.ChartLinearTimeView.extend({
     return "service-metrics-flume-metric-graph-" + this.get('metricType') + '-' + this.get('metricName');
   }.property('metricType', 'metricName'),
 
-  title: function(){
-    return this.get('metricName');
-  }.property('metricName'),
+  title: Em.computed.alias('metricName'),
 
   ajaxIndex: 'host.host_component.flume.metrics.timeseries',
 

+ 5 - 15
ambari-web/app/views/main/service/info/summary.js

@@ -88,9 +88,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin
     return App.get('services.hasClient');
   }.property('App.services.hasClient'),
 
-  hasManyServers: function () {
-    return this.get('servers').length > 1;
-  }.property('servers'),
+  hasManyServers: Em.computed.gt('servers.length', 1),
 
   clientsHostText: function () {
     if (this.get('controller.content.installedClients').length == 0) {
@@ -102,9 +100,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin
     }
   }.property("hasManyClients"),
 
-  hasManyClients: function () {
-    return this.get('controller.content.installedClients').length > 1;
-  }.property('service.installedClients'),
+  hasManyClients: Em.computed.gt('controller.content.installedClients.length', 1),
 
   servers: function () {
     var result = [];
@@ -274,9 +270,7 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin
     href:'javascript:void(null)'
   }),
 
-  serviceName:function () {
-    return this.get('service.serviceName');
-  }.property('service'),
+  serviceName: Em.computed.alias('service.serviceName'),
 
   oldServiceName:'',
 
@@ -286,13 +280,9 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, App.TimeRangeMixin
   componentsCount: null,
   hostsCount: null,
 
-  alertsCount: function () {
-    return this.get('controller.content.alertsCount');
-  }.property('controller.content.alertsCount'),
+  alertsCount: Em.computed.alias('controller.content.alertsCount'),
 
-  hasCriticalAlerts: function () {
-    return this.get('controller.content.hasCriticalAlerts');
-  }.property('controller.content.alertsCount'),
+  hasCriticalAlerts: Em.computed.alias('controller.content.hasCriticalAlerts'),
 
   /**
    * Define if service has alert definitions defined

+ 3 - 9
ambari-web/app/views/main/service/item.js

@@ -21,17 +21,11 @@ var App = require('app');
 App.MainServiceItemView = Em.View.extend({
   templateName: require('templates/main/service/item'),
 
-  serviceName: function() {
-    return this.get('controller.content.serviceName');
-  }.property('controller.content.serviceName'),
+  serviceName: Em.computed.alias('controller.content.serviceName'),
 
-  displayName: function() {
-    return this.get('controller.content.displayName');
-  }.property('controller.content.displayName'),
+  displayName: Em.computed.alias('controller.content.displayName'),
 
-  isPassive: function() {
-    return this.get('controller.content.passiveState') === 'ON';
-  }.property('controller.content.passiveState'),
+  isPassive: Em.computed.equal('controller.content.passiveState', 'ON'),
 
   /**
    * Some custom commands need custom logic to be executed

+ 6 - 18
ambari-web/app/views/main/service/menu.js

@@ -66,21 +66,15 @@ App.MainServiceMenuView = Em.CollectionView.extend({
     templateName:require('templates/main/service/menu_item'),
     restartRequiredMessage: null,
 
-    shouldBeRestarted: function() {
-      return this.get('content.hostComponents').someProperty('staleConfigs', true);
-    }.property('content.hostComponents.@each.staleConfigs'),
+    shouldBeRestarted: Em.computed.someBy('content.hostComponents', 'staleConfigs', true),
 
     active:function () {
       return this.get('content.id') == this.get('parentView.activeServiceId') ? 'active' : '';
     }.property('parentView.activeServiceId'),
 
-    alertsCount: function () {
-      return this.get('content.alertsCount');
-    }.property('content.alertsCount'),
+    alertsCount: Em.computed.alias('content.alertsCount'),
 
-    hasCriticalAlerts: function () {
-      return this.get('content.hasCriticalAlerts');
-    }.property('content.hasCriticalAlerts'),
+    hasCriticalAlerts: Em.computed.alias('content.hasCriticalAlerts'),
 
     isConfigurable: function () {
       return !App.get('services.noConfigTypes').contains(this.get('content.serviceName'));
@@ -173,21 +167,15 @@ App.TopNavServiceMenuView = Em.CollectionView.extend({
     templateName:require('templates/main/service/menu_item'),
     restartRequiredMessage: null,
 
-    shouldBeRestarted: function() {
-      return this.get('content.hostComponents').someProperty('staleConfigs', true);
-    }.property('content.hostComponents.@each.staleConfigs'),
+    shouldBeRestarted: Em.computed.someBy('content.hostComponents', 'staleConfigs', true),
 
     active:function () {
       return this.get('content.id') == this.get('parentView.activeServiceId') ? 'active' : '';
     }.property('parentView.activeServiceId'),
 
-    alertsCount: function () {
-      return this.get('content.alertsCount');
-    }.property('content.alertsCount'),
+    alertsCount: Em.computed.alias('content.alertsCount'),
 
-    hasCriticalAlerts: function () {
-      return this.get('content.hasCriticalAlerts');
-    }.property('content.hasCriticalAlerts'),
+    hasCriticalAlerts: Em.computed.alias('content.hasCriticalAlerts'),
 
     isConfigurable: function () {
       return !App.get('services.noConfigTypes').contains(this.get('content.serviceName'));

+ 2 - 6
ambari-web/app/views/main/service/reassign/step3_view.js

@@ -23,13 +23,9 @@ App.ReassignMasterWizardStep3View = Em.View.extend({
 
   templateName: require('templates/main/service/reassign/step3'),
 
-  sourceHost: function(){
-    return this.get('controller.content.reassignHosts.source');
-  }.property('controller.content.reassignHosts.source'),
+  sourceHost: Em.computed.alias('controller.content.reassignHosts.source'),
 
-  targetHost: function(){
-    return this.get('controller.content.reassignHosts.target');
-  }.property('controller.content.reassignHosts.target'),
+  targetHost: Em.computed.alias('controller.content.reassignHosts.target'),
 
   printReview: function () {
     $("#step8-info").jqprint();

+ 1 - 7
ambari-web/app/views/main/service/reassign/step4_view.js

@@ -39,13 +39,7 @@ App.ReassignMasterWizardStep4View = App.HighAvailabilityProgressPageView.extend(
     }
   }.property('controller.content.reassign.component_name','controller.content.reassignHosts.source','controller.content.reassignHosts.target'),
 
-  submitButtonText: function () {
-    if (this.get('controller.content.hasManualSteps')) {
-      return Em.I18n.t('common.next') + ' &rarr;';
-    } else {
-      return Em.I18n.t('common.complete');
-    }
-  }.property('controller.content.hasManualSteps'),
+  submitButtonText: Em.computed.ifThenElse('controller.content.hasManualSteps', Em.I18n.t('common.next') + ' &rarr;', Em.I18n.t('common.complete')),
 
   templateName: require('templates/main/service/reassign/step4'),
 

+ 4 - 12
ambari-web/app/views/main/service/reassign/step7_view.js

@@ -23,21 +23,13 @@ App.ReassignMasterWizardStep7View = App.HighAvailabilityProgressPageView.extend(
 
   headerTitle: Em.I18n.t('services.reassign.step7.header'),
 
-  noticeInProgress: function () {
-    return Em.I18n.t('services.reassign.step7.info');
-  }.property(),
+  noticeInProgress: Em.I18n.t('services.reassign.step7.info'),
 
-  noticeFailed: function () {
-    return Em.I18n.t('services.reassign.step7.failed');
-  }.property(),
+  noticeFailed: Em.I18n.t('services.reassign.step7.failed'),
 
-  noticeCompleted: function () {
-    return Em.I18n.t('services.reassign.step7.success');
-  }.property(),
+  noticeCompleted: Em.I18n.t('services.reassign.step7.success'),
 
-  submitButtonText: function () {
-    return Em.I18n.t('common.complete') + ' &rarr;';
-  }.property(),
+  submitButtonText: Em.I18n.t('common.complete') + ' &rarr;',
 
   templateName: require('templates/main/service/reassign/step7'),
 

+ 3 - 6
ambari-web/app/views/main/service/reconfigure.js

@@ -54,13 +54,10 @@ App.StageLabelView = Em.View.extend({
     })
   },
 
-  isStarted: function () {
-    return  (this.get('command') && this.get('command.isStarted'));
-  }.property('command.isStarted'),
+  isStarted: Em.computed.alias('command.isStarted'),
+
+  showLink: Em.computed.alias('command.showLink')
 
-  showLink: function () {
-    return (this.get('command') && this.get('command.showLink'));
-  }.property('command.showLink')
 });
 
 App.StageSuccessView = Em.View.extend({

+ 4 - 12
ambari-web/app/views/main/service/service.js

@@ -135,9 +135,7 @@ App.MainDashboardServiceView = Em.View.extend(App.MainDashboardServiceViewWrappe
       App.tooltip($('[rel=SummaryComponentHealthTooltip]'));
     },
     templateName: require('templates/main/service/info/summary/master_components'),
-    mastersComp: function () {
-      return this.get('parentView.parentView.mastersObj');
-    }.property("parentView.parentView.mastersObj"),
+    mastersComp: Em.computed.alias('parentView.parentView.mastersObj'),
     willDestroyElement: function() {
       $('[rel=SummaryComponentHealthTooltip]').tooltip('destroy');
     }
@@ -147,13 +145,9 @@ App.MainDashboardServiceView = Em.View.extend(App.MainDashboardServiceViewWrappe
     return (value || value == 0) ? value : this.t('services.service.summary.notAvailable');
   },
 
-  alertsCount: function () {
-    return this.get('service.alertsCount');
-  }.property('service.alertsCount'),
+  alertsCount: Em.computed.alias('service.alertsCount'),
 
-  hasCriticalAlerts: function () {
-    return this.get('service.hasCriticalAlerts');
-  }.property('service.hasCriticalAlerts'),
+  hasCriticalAlerts: Em.computed.alias('service.hasCriticalAlerts'),
 
   isCollapsed: false,
 
@@ -162,9 +156,7 @@ App.MainDashboardServiceView = Em.View.extend(App.MainDashboardServiceViewWrappe
     this.set('isCollapsed', !this.isCollapsed);
   },
 
-  masters: function(){
-    return this.get('service.hostComponents').filterProperty('isMaster', true);
-  }.property('service'),
+  masters: Em.computed.filterBy('service.hostComponents', 'isMaster', true),
 
   clients: function(){
     var clients = this.get('service.hostComponents').filterProperty('isClient', true);

+ 4 - 12
ambari-web/app/views/main/service/services/hbase.js

@@ -25,15 +25,11 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({
   /**
    * All master components
    */
-  masters: function () {
-    return this.get('service.hostComponents').filterProperty('isMaster', true);
-  }.property('service.hostComponents.length'),
+  masters: Em.computed.filterBy('service.hostComponents', 'isMaster', true),
   /**
    * Passive master components
    */
-  passiveMasters: function () {
-    return this.get('masters').filterProperty('haStatus', 'false');
-  }.property('masters'),
+  passiveMasters: Em.computed.filterBy('masters', 'haStatus', 'false'),
 
   regionServesText: function () {
     if (this.get('service.regionServersTotal') == 0) {
@@ -55,16 +51,12 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({
     }
   }.property("service"),
 
-  showPhoenixInfo: function () {
-    return !!this.get('service.phoenixServersTotal');
-  }.property("service.phoenixServersTotal"),
+  showPhoenixInfo: Em.computed.bool('service.phoenixServersTotal'),
 
   /**
    * One(!) active master component
    */
-  activeMaster: function () {
-    return this.get('masters').findProperty('haStatus', 'true');
-  }.property('masters'),
+  activeMaster: Em.computed.findBy('masters', 'haStatus', 'true'),
 
   activeMasterTitle: function(){
     return this.t('service.hbase.activeMaster');

+ 4 - 12
ambari-web/app/views/main/service/services/hdfs.js

@@ -71,21 +71,15 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
     $("[rel='tooltip']").tooltip('destroy');
   },
 
-  dataNodesDead: function () {
-    return this.get('service.dataNodesInstalled');
-  }.property('service.dataNodesInstalled'),
+  dataNodesDead: Em.computed.alias('service.dataNodesInstalled'),
 
-  showJournalNodes: function () {
-    return this.get('service.journalNodes.length') > 0;
-  }.property('service.journalNodes.length'),
+  showJournalNodes: Em.computed.gt('service.journalNodes.length', 0),
 
   journalNodesLive: function () {
     return this.get('service.journalNodes').filterProperty("workStatus", "STARTED").get("length");
   }.property("service.journalNodes.@each.workStatus"),
 
-  journalNodesTotal: function () {
-    return this.get('service.journalNodes').get("length");
-  }.property("service.journalNodes.length"),
+  journalNodesTotal: Em.computed.alias('service.journalNodes.length'),
 
   dfsTotalBlocks: function(){
     return this.formatUnavailable(this.get('service.dfsTotalBlocks'));
@@ -189,9 +183,7 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
     return App.StackServiceComponent.find().someProperty('componentName', 'NFS_GATEWAY');
   }.property(),
   
-  journalNodeComponent: function () {
-    return this.get('service.journalNodes').objectAt(0);
-  }.property(),
+  journalNodeComponent: Em.computed.alias('service.journalNodes.firstObject'),
 
   safeModeStatus: function () {
     var safeMode = this.get('service.safeModeStatus');

+ 2 - 6
ambari-web/app/views/main/service/services/storm.js

@@ -35,13 +35,9 @@ App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({
     return Math.round(this.get('service.freeSlots')/this.get('service.totalSlots')*100);
   }.property('service.freeSlots', 'service.totalSlots'),
 
-  superVisorsLive: function () {
-    return this.get('service.superVisorsStarted');
-  }.property('service.superVisorsStarted'),
+  superVisorsLive: Em.computed.alias('service.superVisorsStarted'),
 
-  superVisorsTotal: function() {
-    return this.get('service.superVisorsTotal');
-  }.property('service.superVisorsTotal'),
+  superVisorsTotal: Em.computed.alias('service.superVisorsTotal'),
 
   nimbusUptimeFormatted: function() {
     return this.get('service.nimbusUptime') || Em.I18n.t('services.service.summary.notRunning');

+ 1 - 3
ambari-web/app/views/main/service/services/yarn.js

@@ -54,9 +54,7 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
     //return this.get('service.hostComponents').findProperty('componentName', 'YARN_CLIENT');
   }.property(),
 
-  hasManyYarnClients: function () {
-    return (this.get('service.installedClients') > 1);
-  }.property('service.installedClients'),
+  hasManyYarnClients: Em.computed.gt('service.installedClients', 1),
 
   nodeUptime: function () {
     var uptime = this.get('service').get('resourceManagerStartTime');

+ 7 - 15
ambari-web/app/views/wizard/step1_view.js

@@ -17,6 +17,8 @@
 
 var App = require('app');
 
+require('models/repository');
+
 App.WizardStep1View = Em.View.extend({
 
   templateName: require('templates/wizard/step1'),
@@ -69,17 +71,13 @@ App.WizardStep1View = Em.View.extend({
    * Verify if some repo has empty base-url
    * @type {bool}
    */
-  invalidFormatUrlExist: function () {
-    return this.get('allRepositories').someProperty('invalidFormatError', true);
-  }.property('allRepositories.@each.invalidFormatError'),
+  invalidFormatUrlExist: Em.computed.someBy('allRepositories', 'invalidFormatError', true),
 
   /**
    * Disable submit button flag
    * @type {bool}
    */
-  isSubmitDisabled: function () {
-    return this.get('invalidFormatUrlExist') || this.get('isNoOsChecked') || this.get('invalidUrlExist') || this.get('controller.content.isCheckInProgress');
-  }.property('invalidFormatUrlExist', 'isNoOsChecked', 'invalidUrlExist', 'controller.content.isCheckInProgress'),
+  isSubmitDisabled: Em.computed.or('invalidFormatUrlExist', 'isNoOsChecked', 'invalidUrlExist', 'controller.content.isCheckInProgress'),
 
   /**
    * Enable error count badge
@@ -93,17 +91,13 @@ App.WizardStep1View = Em.View.extend({
    * Verify if some invalid repo-urls exist
    * @type {bool}
    */
-  invalidUrlExist: function () {
-    return this.get('allRepositories').someProperty('validation', App.Repository.validation['INVALID']);
-  }.property('allRepositories.@each.validation'),
+  invalidUrlExist: Em.computed.someBy('allRepositories', 'validation', App.Repository.validation['INVALID']),
 
   /**
    * If all repo links are unchecked
    * @type {bool}
    */
-  isNoOsChecked: function () {
-    return this.get('operatingSystems').everyProperty('isSelected', false);
-  }.property('operatingSystems.@each.isSelected'),
+  isNoOsChecked: Em.computed.everyBy('operatingSystems', 'isSelected', false),
 
   /**
    * Overall errors count
@@ -128,9 +122,7 @@ App.WizardStep1View = Em.View.extend({
   stackRadioButton: Em.Checkbox.extend({
     tagName: 'input',
     attributeBindings: [ 'type', 'checked' ],
-    checked: function () {
-      return this.get('content.isSelected');
-    }.property('content.isSelected'),
+    checked: Em.computed.alias('content.isSelected'),
     type: 'radio',
 
     click: function () {

+ 4 - 12
ambari-web/app/views/wizard/step2_view.js

@@ -61,9 +61,7 @@ App.WizardStep2View = Em.View.extend({
    * Is manualInstall selected
    * @type {bool}
    */
-  sshKeyState: function () {
-    return this.get("controller.content.installOptions.manualInstall");
-  }.property("controller.content.installOptions.manualInstall"),
+  sshKeyState: Em.computed.alias('controller.content.installOptions.manualInstall'),
 
   /**
    * Is File API available
@@ -88,9 +86,7 @@ App.WizardStep2View = Em.View.extend({
 
     classNames: ['radio-btn-provide-ssh-key'],
 
-    checked: function () {
-      return this.get('controller.content.installOptions.useSsh');
-    }.property('controller.content.installOptions.useSsh'),
+    checked: Em.computed.alias('controller.content.installOptions.useSsh'),
 
     type: 'radio',
 
@@ -113,9 +109,7 @@ App.WizardStep2View = Em.View.extend({
 
     type: 'radio',
 
-    checked: function () {
-      return this.get('controller.content.installOptions.manualInstall');
-    }.property('controller.content.installOptions.manualInstall'),
+    checked: Em.computed.alias('controller.content.installOptions.manualInstall'),
 
     click: function () {
       this.set('controller.content.installOptions.manualInstall', true);
@@ -133,9 +127,7 @@ App.WizardStep2View = Em.View.extend({
      * Is textfield disabled
      * @type {bool}
      */
-    disabled: function () {
-      return !this.get('isEnabled');
-    }.property('isEnabled')
+    disabled: Em.computed.not('isEnabled')
   })
 
 });

+ 2 - 6
ambari-web/app/views/wizard/step3/hostLogPopupBody_view.js

@@ -26,9 +26,7 @@ App.WizardStep3HostLogPopupBody = Em.View.extend({
    * Host's boot log
    * @type {string}
    */
-  bootLog: function() {
-    return this.get('parentView.host.bootLog');
-  }.property('parentView.host.bootLog'),
+  bootLog: Em.computed.alias('parentView.host.bootLog'),
 
   /**
    * Is textarea view active
@@ -61,9 +59,7 @@ App.WizardStep3HostLogPopupBody = Em.View.extend({
      * <code>parentView.bootLog</code>
      * @type {string}
      */
-    value: function () {
-      return this.get('content');
-    }.property('content')
+    value: Em.computed.alias('content')
 
   }),
 

+ 2 - 6
ambari-web/app/views/wizard/step3/hostWarningPopupBody_view.js

@@ -109,18 +109,14 @@ App.WizardStep3HostWarningPopupBody = Em.View.extend({
    * Same to <code>bodyController.warningsByHost</code>
    * @type {Ember.Enumerable}
    */
-  warningsByHost: function () {
-    return this.get('bodyController.warningsByHost');
-  }.property('bodyController.warningsByHost'),
+  warningsByHost: Em.computed.alias('bodyController.warningsByHost'),
 
   /**
    * List of all warnings
    * Same to <code>bodyController.warnings</code>
    * @type {Ember.Enumerable}
    */
-  warnings: function () {
-    return this.get('bodyController.warnings');
-  }.property('bodyController.warnings'),
+  warnings: Em.computed.alias('bodyController.warnings'),
 
   /**
    * Selected category

+ 2 - 6
ambari-web/app/views/wizard/step3_view.js

@@ -54,9 +54,7 @@ App.WizardStep3View = App.TableView.extend({
    * Active category
    * @type {string}
    */
-  selectedCategory: function() {
-    return this.get('categories').findProperty('isActive');
-  }.property('categories.@each.isActive'),
+  selectedCategory: Em.computed.findBy('categories', 'isActive', true),
 
   /**
    * Message about other registered hosts (not included in current registration)
@@ -86,9 +84,7 @@ App.WizardStep3View = App.TableView.extend({
       return "%@ (%@)".fmt(this.get('value'), this.get('hostsCount'));
     }.property('value', 'hostsCount'),
     isActive: false,
-    itemClass: function () {
-      return this.get('isActive') ? 'active' : '';
-    }.property('isActive')
+    itemClass: Em.computed.ifThenElse('isActive', 'active', '')
   }),
 
   /**

+ 3 - 6
ambari-web/app/views/wizard/step5_view.js

@@ -21,12 +21,9 @@ var stringUtils = require('utils/string_utils');
 
 App.WizardStep5View = App.AssignMasterComponentsView.extend({
 
-  title: function () {
-    if (this.get('controller.content.controllerName') === 'reassignMasterController') {
-      return Em.I18n.t('installer.step5.reassign.header');
-    }
-    return Em.I18n.t('installer.step5.header');
-  }.property('controller.content.controllerName'),
+  isReassignWizard: Em.computed.equal('controller.content.controllerName', 'reassignMasterController'),
+
+  title: Em.computed.ifThenElse('isReassignWizard', Em.I18n.t('installer.step5.reassign.header'), Em.I18n.t('installer.step5.header')),
 
   alertMessage: function () {
     var result = Em.I18n.t('installer.step5.body');

+ 1 - 3
ambari-web/app/views/wizard/step6_view.js

@@ -41,9 +41,7 @@ App.WizardStep6View = App.TableView.extend({
    * Synonym to <code>content</code> in this <code>App.TableView</code>
    * @type {object[]}
    */
-  filteredContent: function () {
-    return this.get('content');
-  }.property('content'),
+  filteredContent: Em.computed.alias('content'),
 
   /**
    * Set <code>label</code> and do <code>loadStep</code>

+ 2 - 6
ambari-web/app/views/wizard/step9/hostLogPopupBody_view.js

@@ -27,17 +27,13 @@ App.WizardStep9HostLogPopupBodyView = Em.View.extend({
    * Does host lost heartbeat
    * @type {bool}
    */
-  isHeartbeatLost: function() {
-    return (this.get('parentView.host.status') === 'heartbeat_lost');
-  }.property('parentView.host.status'),
+  isHeartbeatLost: Em.computed.equal('parentView.host.status', 'heartbeat_lost'),
 
   /**
    * Does host doesn't have scheduled tasks for install
    * @type {bool}
    */
-  isNoTasksScheduled: function() {
-    return this.get('parentView.host.isNoTasksForInstall');
-  }.property('parentView.host.isNoTasksForInstall'),
+  isNoTasksScheduled: Em.computed.alias('parentView.host.isNoTasksForInstall'),
 
   /**
    * Is log-box hidden

+ 4 - 12
ambari-web/app/views/wizard/step9_view.js

@@ -45,9 +45,7 @@ App.WizardStep9View = App.TableView.extend({
    * When progress is 100, step is completed
    * @type {bool}
    */
-  isStepCompleted: function() {
-   return (this.get('controller.progress') === '100');
-  }.property('controller.progress'),
+  isStepCompleted: Em.computed.equal('controller.progress', '100'),
 
   /**
    * Number of visible hosts
@@ -67,9 +65,7 @@ App.WizardStep9View = App.TableView.extend({
    * Active category
    * @type {Ember.Object}
    */
-  selectedCategory: function() {
-    return this.get('categories').findProperty('isActive');
-  }.property('categories.@each.isActive'),
+  selectedCategory: Em.computed.findBy('categories', 'isActive', true),
 
   /**
    * Ember Object category. This object also contains
@@ -88,9 +84,7 @@ App.WizardStep9View = App.TableView.extend({
       return "%@ (%@)".fmt(this.get('value'), this.get('hostsCount'));
     }.property('value', 'hostsCount'),
     isActive: false,
-    itemClass: function () {
-      return this.get('isActive') ? 'active' : '';
-    }.property('isActive')
+    itemClass: Em.computed.ifThenElse('isActive', 'active', '')
   }),
 
   /**
@@ -111,9 +105,7 @@ App.WizardStep9View = App.TableView.extend({
    * True if <code>controller.hostsWithHeartbeatLost</code> contains some values
    * @type {bool}
    */
-  isHostHeartbeatLost: function () {
-    return (this.get('controller.hostsWithHeartbeatLost').length > 0);
-  }.property('controller.hostsWithHeartbeatLost.@each'),
+  isHostHeartbeatLost: Em.computed.bool('controller.hostsWithHeartbeatLost.length'),
 
   /**
    * Css-string to overall progress-bar width-property