ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [05/50] [abbrv] git commit: AMBARI-6896. Clients set to install after go back to "Assign Slaves and Clients" in Add Host wizard (Max Shepel via alexantonenko)
Date Wed, 20 Aug 2014 15:30:06 GMT
AMBARI-6896. Clients set to install after go back to "Assign Slaves and Clients" in Add Host
wizard (Max Shepel via alexantonenko)


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

Branch: refs/heads/branch-alerts-dev
Commit: 947899ec670aea29f00ca1aa95ea8ec226c64807
Parents: 620978b
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Mon Aug 18 19:42:19 2014 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Mon Aug 18 19:42:19 2014 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step6_controller.js   | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/947899ec/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 a3e97ce..9fe8685 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -60,6 +60,12 @@ App.WizardStep6Controller = Em.Controller.extend({
   isLoaded: false,
 
   /**
+   * Indication if user has chosen hosts to install clients
+   * @type {bool}
+   */
+  isClientsSet: false,
+
+  /**
    * Define state for submit button
    * @type {bool}
    */
@@ -425,11 +431,14 @@ App.WizardStep6Controller = Em.Controller.extend({
    * @param hostsObj
    */
   selectClientHost: function (hostsObj) {
-    var nonMasterHost = hostsObj.findProperty('hasMaster', false);
-    var clientHost = !!nonMasterHost ? nonMasterHost : hostsObj[hostsObj.length - 1]; //
last host
-    var clientCheckBox = clientHost.get('checkboxes').findProperty('component', 'CLIENT');
-    if (clientCheckBox) {
-      clientCheckBox.set('checked', true);
+    if (!this.get('isClientsSet')) {
+      var nonMasterHost = hostsObj.findProperty('hasMaster', false);
+      var clientHost = !!nonMasterHost ? nonMasterHost : hostsObj[hostsObj.length - 1]; //
last host
+      var clientCheckBox = clientHost.get('checkboxes').findProperty('component', 'CLIENT');
+      if (clientCheckBox) {
+        clientCheckBox.set('checked', true);
+      }
+      this.set('isClientsSet', true);
     }
   },
 


Mime
View raw message