You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/08/19 05:39:55 UTC
[02/12] git commit: AMBARI-6896. Clients set to install after go back
to "Assign Slaves and Clients" in Add Host wizard (Max Shepel via
alexantonenko)
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/64655a05
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/64655a05
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/64655a05
Branch: refs/heads/branch-alerts-dev
Commit: 64655a050bc47bb33f2d1947e46072e4a223fdc0
Parents: 09edccf
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Aug 18 19:42:19 2014 +0300
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Mon Aug 18 23:12:34 2014 -0400
----------------------------------------------------------------------
.../app/controllers/wizard/step6_controller.js | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/64655a05/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);
}
},