incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-3470. "Assign Slaves and Clients" step. "Next" button doesn't work. (onechiporenko)
Date Mon, 07 Oct 2013 10:53:20 GMT
Updated Branches:
  refs/heads/trunk 94a17ec4a -> ce5f62edd


AMBARI-3470. "Assign Slaves and Clients" step. "Next" button doesn't work. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: ce5f62eddc3400d64ca3fbeb796747a03fdb18db
Parents: 94a17ec
Author: Oleg Nechiporenko <cv_github@yahoo.com>
Authored: Mon Oct 7 13:49:34 2013 +0300
Committer: Oleg Nechiporenko <cv_github@yahoo.com>
Committed: Mon Oct 7 13:49:34 2013 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step6_controller.js      | 16 +++++++++++++---
 ambari-web/test/installer/step6_test.js             | 11 +++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ce5f62ed/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 8880af8..5e0a411 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -53,6 +53,10 @@ App.WizardStep6Controller = Em.Controller.extend({
     return this.get('content.controllerName') === 'installerController';
   }.property('content.controllerName'),
 
+  isAddServiceWizard: function() {
+    return this.get('content.controllerName') === 'addServiceController';
+  }.property('content.controllerName'),
+
   clearError: function () {
     var self = this;
     var isError = false;
@@ -409,9 +413,15 @@ App.WizardStep6Controller = Em.Controller.extend({
     if (this.get('isAddHostWizard')) {
       return this.validateEachHost(Em.I18n.t('installer.step6.error.mustSelectOneForHost'));
     }
-    else if (this.get('isInstallerWizard')) {
-      //this.validateEachComponent() ? this.validateEachHost(Em.I18n.t('installer.step6.error.mustSelectOneForHost')
? return true : return false : return false;
-     return this.validateEachComponent() && this.validateEachHost(Em.I18n.t('installer.step6.error.mustSelectOneForSlaveHost'));
+    else {
+      if (this.get('isInstallerWizard')) {
+       return this.validateEachComponent() && this.validateEachHost(Em.I18n.t('installer.step6.error.mustSelectOneForSlaveHost'));
+      }
+      else {
+        if(this.get('isAddServiceWizard')) {
+          return this.validateEachComponent();
+        }
+      }
     }
   },
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ce5f62ed/ambari-web/test/installer/step6_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/installer/step6_test.js b/ambari-web/test/installer/step6_test.js
index b515b44..8ebc0e5 100644
--- a/ambari-web/test/installer/step6_test.js
+++ b/ambari-web/test/installer/step6_test.js
@@ -99,6 +99,17 @@ describe('App.WizardStep6Controller', function () {
     });
   });
 
+  describe('#isAddServiceWizard', function() {
+    it('true if content.controllerName is addServiceController', function() {
+      controller.set('content.controllerName', 'addServiceController');
+      expect(controller.get('isAddServiceWizard')).to.equal(true);
+    });
+    it('false if content.controllerName is not addServiceController', function() {
+      controller.set('content.controllerName', 'mainController');
+      expect(controller.get('isAddServiceWizard')).to.equal(false);
+    });
+  });
+
   describe('#hasMasterComponents', function() {
     HOSTS.forEach(function(host) {
       it('Host ' + host + ' is master', function() {


Mime
View raw message