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 2014/08/05 15:05:52 UTC
git commit: AMBARI-6744. 'Select Host' page on Resource Manager HA
Enabling wizard does not save selected values after next/back steps.
(akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 1153b2d96 -> c80ae8b11
AMBARI-6744. 'Select Host' page on Resource Manager HA Enabling wizard does not save selected values after next/back steps. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c80ae8b1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c80ae8b1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c80ae8b1
Branch: refs/heads/trunk
Commit: c80ae8b112968759db6e12863275dbf7fe61333d
Parents: 1153b2d
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Tue Aug 5 16:03:24 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Tue Aug 5 16:05:35 2014 +0300
----------------------------------------------------------------------
.../highAvailability/resourceManager/step2_controller.js | 4 +++-
.../highAvailability/resourceManager/wizard_controller.js | 2 +-
ambari-web/app/controllers/wizard/step5_controller.js | 7 +++----
ambari-web/app/routes/rm_high_availability_routes.js | 1 +
4 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c80ae8b1/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
index 13e3f11..bf3794e 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step2_controller.js
@@ -29,10 +29,12 @@ App.RMHighAvailabilityWizardStep2Controller = App.WizardStep5Controller.extend({
renderComponents: function (masterComponents) {
var existedRM = masterComponents.findProperty('component_name', 'RESOURCEMANAGER');
existedRM.isAdditional = false;
+ var additionalRMSelectedHost = this.get('content.rmHosts.additionalRM') ||
+ this.get('hosts').mapProperty('host_name').without(existedRM.selectedHost)[0];
var additionalRM = $.extend({}, existedRM, {
isInstalled: false,
isAdditional: true,
- selectedHost: this.get('hosts').mapProperty('host_name').without(existedRM.selectedHost)[0]
+ selectedHost: additionalRMSelectedHost
});
masterComponents.push(additionalRM);
this._super(masterComponents);
http://git-wip-us.apache.org/repos/asf/ambari/blob/c80ae8b1/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js
index 7c94cbd..5d6d639 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/wizard_controller.js
@@ -115,8 +115,8 @@ App.RMHighAvailabilityWizardController = App.WizardController.extend({
this.loadRequestIds();
this.loadConfigs();
case '3':
- this.loadRmHosts();
case '2':
+ this.loadRmHosts();
this.loadServicesFromServer();
this.loadMasterComponentHosts();
this.loadConfirmedHosts();
http://git-wip-us.apache.org/repos/asf/ambari/blob/c80ae8b1/ambari-web/app/controllers/wizard/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step5_controller.js b/ambari-web/app/controllers/wizard/step5_controller.js
index c137d38..15c5549 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -567,11 +567,10 @@ App.WizardStep5Controller = Em.Controller.extend({
},
sortComponentsByServiceName: function(components) {
- var _components = components.sortPropertyLight('selectedHost');
var displayOrder = App.StackService.displayOrder;
- return _components.sort(function (a, b) {
- var aValue = displayOrder.indexOf(a.serviceId) != -1 ? displayOrder.indexOf(a.serviceId) : _components.length;
- var bValue = displayOrder.indexOf(b.serviceId) != -1 ? displayOrder.indexOf(b.serviceId) : _components.length;
+ return components.sort(function (a, b) {
+ var aValue = displayOrder.indexOf(a.serviceId) != -1 ? displayOrder.indexOf(a.serviceId) : components.length;
+ var bValue = displayOrder.indexOf(b.serviceId) != -1 ? displayOrder.indexOf(b.serviceId) : components.length;
return aValue - bValue;
});
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/c80ae8b1/ambari-web/app/routes/rm_high_availability_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/rm_high_availability_routes.js b/ambari-web/app/routes/rm_high_availability_routes.js
index 167656a..3c34146 100644
--- a/ambari-web/app/routes/rm_high_availability_routes.js
+++ b/ambari-web/app/routes/rm_high_availability_routes.js
@@ -94,6 +94,7 @@ module.exports = App.WizardRoute.extend({
return false;
},
next: function (router) {
+ router.get('rMHighAvailabilityWizardController').setDBProperty('rmHosts', undefined);
router.transitionTo('step2');
}
}),