Repository: ambari Updated Branches: refs/heads/trunk ee374e94a -> 2583407a8
AMBARI-8108. Duplicate slave components categories in Add Service Wizard (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2583407a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2583407a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2583407a Branch: refs/heads/trunk Commit: 2583407a82a572bca6619ced6ae0c9f27c567946 Parents: ee374e9 Author: Alex Antonenko <[email protected]> Authored: Sun Nov 2 20:37:15 2014 +0200 Committer: Alex Antonenko <[email protected]> Committed: Sun Nov 2 23:42:26 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service/add_controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2583407a/ambari-web/app/controllers/main/service/add_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js index 1fc7fd0..39b57c7 100644 --- a/ambari-web/app/controllers/main/service/add_controller.js +++ b/ambari-web/app/controllers/main/service/add_controller.js @@ -66,7 +66,7 @@ App.AddServiceController = App.WizardController.extend({ /** * Load services data. Will be used at <code>Select services(step4)</code> step */ - loadServices: function (isStep1) { + loadServices: function () { var services = this.getDBProperty('services'); if (!services) { services = { @@ -87,7 +87,7 @@ App.AddServiceController = App.WizardController.extend({ App.StackService.find().forEach(function (item) { var isSelected = services.selectedServices.contains(item.get('serviceName')); var isInstalled = services.installedServices.contains(item.get('serviceName')); - item.set('isSelected', isSelected || (isStep1 ? isInstalled : isSelected)); + item.set('isSelected', isSelected || (this.get("currentStep") == "1" ? isInstalled : isSelected)); item.set('isInstalled', isInstalled); }, this); var isServiceWithSlave = App.StackService.find().filterProperty('isSelected').filterProperty('hasSlave').filterProperty('isInstalled', false).mapProperty('serviceName').length; @@ -355,7 +355,7 @@ App.AddServiceController = App.WizardController.extend({ this.loadMasterComponentHosts(); this.load('hosts'); case '1': - this.loadServices(true); + this.loadServices(); } },
