You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2013/10/22 13:44:44 UTC

git commit: AMBARI-3570 Assign Slaves and Clients step perfomance defects. (atkach)

Updated Branches:
  refs/heads/trunk 38569ba59 -> b356135d2


AMBARI-3570 Assign Slaves and Clients step perfomance defects. (atkach)


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

Branch: refs/heads/trunk
Commit: b356135d2ff637748c189e7267e0750d04be65a6
Parents: 38569ba
Author: atkach <an...@gmail.com>
Authored: Tue Oct 22 14:44:40 2013 +0300
Committer: atkach <an...@gmail.com>
Committed: Tue Oct 22 14:44:40 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step6_controller.js |  2 ++
 ambari-web/app/views/wizard/step6_view.js             | 14 ++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b356135d/ambari-web/app/controllers/wizard/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js
index 4917cee..288e642 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -141,10 +141,12 @@ App.WizardStep6Controller = Em.Controller.extend({
     this.get('hosts').forEach(function (host) {
       host.get('checkboxes').filterProperty('isInstalled', false).forEach(function (checkbox) {
         if (checkbox.get('title') === label) {
+          checkbox.set('setAll', true);
           checkbox.set('checked', checked);
         }
       });
     });
+    this.checkCallback(label);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/b356135d/ambari-web/app/views/wizard/step6_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step6_view.js b/ambari-web/app/views/wizard/step6_view.js
index deca4be..42f6541 100644
--- a/ambari-web/app/views/wizard/step6_view.js
+++ b/ambari-web/app/views/wizard/step6_view.js
@@ -97,16 +97,22 @@ App.WizardStep6CheckboxView = Em.Checkbox.extend({
    */
   checkbox: null,
 
+  //if setAll true there is no need to check every checkbox whether all checked or not
+  setAllBinding: 'checkbox.setAll',
+
   checkedBinding: 'checkbox.checked',
 
   disabledBinding: 'checkbox.isInstalled',
 
   checkCallback: function() {
     var self = this;
-    Ember.run.next(function(){
-      self.get('controller').checkCallback(self.get('checkbox.title'));
-    });
-
+    if(this.get('setAll')){
+      this.set('setAll', false);
+    } else {
+      Ember.run.next(function(){
+        self.get('controller').checkCallback(self.get('checkbox.title'));
+      });
+    }
   }.observes('checked'),
 
   template: Ember.Handlebars.compile('{{checkbox.title}}')