Repository: ambari
Updated Branches:
  refs/heads/branch-1.5.0 d22d57b4d -> 7b1e4368e


AMBARI-5238. UI showing Hive configs on HBase service page. (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7b1e4368
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7b1e4368
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7b1e4368

Branch: refs/heads/branch-1.5.0
Commit: 7b1e4368e9f93e8c14eb2aeb52dcec9c1cc83153
Parents: d22d57b
Author: Oleg Nechiporenko <[email protected]>
Authored: Thu Mar 27 15:54:56 2014 +0200
Committer: Oleg Nechiporenko <[email protected]>
Committed: Thu Mar 27 15:54:56 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/views/wizard/controls_view.js | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b1e4368/ambari-web/app/views/wizard/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/controls_view.js 
b/ambari-web/app/views/wizard/controls_view.js
index 8790ec9..cbb55ec 100644
--- a/ambari-web/app/views/wizard/controls_view.js
+++ b/ambari-web/app/views/wizard/controls_view.js
@@ -346,26 +346,22 @@ App.ServiceConfigRadioButton = Ember.Checkbox.extend({
     // Wrapping the call with Ember.run.next prevents a problem where setting 
isVisible on component
     // causes JS error due to re-rendering.  For example, this occurs when 
switching the Config Group
     // in Service Config page
-    Ember.run.next(this, function() {
+    Em.run.next(this, function() {
       console.debug('App.ServiceConfigRadioButton.onChecked');
       this.set('parentView.serviceConfig.value', this.get('value'));
       var components = this.get('parentView.serviceConfig.options');
-      components
-        .forEach(function (_component) {
+      if (components) {
+        components.forEach(function (_component) {
           if (_component.foreignKeys) {
             _component.foreignKeys.forEach(function (_componentName) {
               if 
(this.get('parentView.categoryConfigsAll').someProperty('name', 
_componentName)) {
                 var component = 
this.get('parentView.categoryConfigsAll').findProperty('name', _componentName);
-                if (_component.displayName === this.get('value')) {
-                  console.debug('setting isVisible on ' + 
component.get('name'));
-                  component.set('isVisible', true);
-                } else {
-                  component.set('isVisible', false);
-                }
+                component.set('isVisible', _component.displayName === 
this.get('value'));
               }
             }, this);
           }
         }, this);
+      }
     });
   }.observes('checked'),
 

Reply via email to