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 2017/01/10 14:50:13 UTC
[3/3] ambari git commit: AMBARI-19329. Install Wizard cannot proceed
beyond Select Services page (akovalenko)
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/96b9a3a0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/96b9a3a0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/96b9a3a0
Branch: refs/heads/branch-2.5
Commit: 96b9a3a0acfabad943048623dc20a0989b7a142a
Parents: 0722e54
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Dec 30 15:44:54 2016 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Tue Jan 10 16:47:07 2017 +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/96b9a3a0/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index bc73e8f..f0c2a02 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -1307,7 +1307,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'));
@@ -1329,8 +1329,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/96b9a3a0/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 3968af7..0db9314 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -432,7 +432,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.BlueprintMixin, {
} 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/96b9a3a0/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 356b371..87e2514 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() {