You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2016/12/30 15:09:02 UTC
ambari git commit: AMBARI-19329. Install Wizard cannot proceed beyond
Select Services page (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk d110186e8 -> 51a9b01e4
AMBARI-19329. Install Wizard cannot proceed beyond Select Services page (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/51a9b01e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/51a9b01e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/51a9b01e
Branch: refs/heads/trunk
Commit: 51a9b01e434b79bb2fa5cfce1e46ed569a03eaca
Parents: d110186
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Dec 30 15:44:54 2016 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Dec 30 16:14:32 2016 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/wizard.js | 6 +++---
ambari-web/app/controllers/wizard/step6_controller.js | 4 +++-
ambari-web/test/controllers/wizard/step6_test.js | 10 ++++++++++
3 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/51a9b01e/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index 8742546..b4fc8c5 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -1309,7 +1309,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
var hasServicesWithSlave = services.someProperty('hasSlave');
var hasServicesWithClient = services.someProperty('hasClient');
var hasServicesWithCustomAssignedNonMasters = services.someProperty('hasNonMastersWithCustomAssignment');
- var hasDependentSlaveComponent = this.hasDependentSlaveComponent(services);
+ var hasDependentSlaveComponent = this.get('name') === 'addServiceController' ? this.hasDependentSlaveComponent(services) : false;
this.set('content.skipSlavesStep', (!hasServicesWithSlave && !hasServicesWithClient || !hasServicesWithCustomAssignedNonMasters) && !hasDependentSlaveComponent);
if (this.get('content.skipSlavesStep')) {
this.get('isStepDisabled').findProperty('step', step).set('value', this.get('content.skipSlavesStep'));
@@ -1331,8 +1331,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
service.get('serviceComponents').forEach(function (component) {
component.get('dependencies').forEach(function (dependency) {
var dependentService = App.StackService.find().findProperty('serviceName', dependency.serviceName);
- var dependentComponent = dependentService.get('serviceComponents').findProperty('componentName', dependency.componentName);
- if (dependentComponent.get('isSlave') && dependentService.get('isInstalled')) {
+ var dependentComponent = dependentService && dependentService.get('serviceComponents').findProperty('componentName', dependency.componentName);
+ if (dependentComponent && dependentComponent.get('isSlave') && dependentService.get('isInstalled')) {
dependentSlaves.push({component: dependentComponent.get('componentName'), count: 0});
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/51a9b01e/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 745ecc7..adfa0ba 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -441,7 +441,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.HostComponentValidationMixi
} else {
this.restoreComponentsSelection(hostsObj, slaveComponents);
}
- this.enableCheckboxesForDependentComponents(hostsObj);
+ if (this.get('isAddServiceWizard')) {
+ this.enableCheckboxesForDependentComponents(hostsObj);
+ }
this.selectClientHost(hostsObj);
return hostsObj;
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/51a9b01e/ambari-web/test/controllers/wizard/step6_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step6_test.js b/ambari-web/test/controllers/wizard/step6_test.js
index 851b984..85b4fab 100644
--- a/ambari-web/test/controllers/wizard/step6_test.js
+++ b/ambari-web/test/controllers/wizard/step6_test.js
@@ -208,6 +208,7 @@ describe('App.WizardStep6Controller', function () {
beforeEach(function() {
controller.set('content.slaveComponentHosts', null);
+ controller.set('content.controllerName', null);
});
it("selectRecommendedComponents should be called", function() {
@@ -226,6 +227,15 @@ describe('App.WizardStep6Controller', function () {
expect(controller.renderSlaves(hostsObj)).to.eql(hostsObj);
expect(controller.selectClientHost.calledWith(hostsObj)).to.be.true;
});
+ it("enableCheckboxesForDependentComponents should not be called", function() {
+ expect(controller.renderSlaves(hostsObj)).to.eql(hostsObj);
+ expect(controller.enableCheckboxesForDependentComponents.calledOnce).to.be.false;
+ });
+ it("enableCheckboxesForDependentComponents should be called", function() {
+ controller.set('content.controllerName', 'addServiceController');
+ expect(controller.renderSlaves(hostsObj)).to.eql(hostsObj);
+ expect(controller.enableCheckboxesForDependentComponents.calledOnce).to.be.true;
+ });
});
describe("slaveComponents is defined", function() {