Repository: ambari Updated Branches: refs/heads/trunk eaa65facf -> 0455aac03
AMBARI-9048. Hide Ganglia in UI Cluster Install Wizard (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0455aac0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0455aac0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0455aac0 Branch: refs/heads/trunk Commit: 0455aac0305288494178088daf581c6841dab7ce Parents: eaa65fa Author: Alex Antonenko <[email protected]> Authored: Thu Jan 8 20:04:07 2015 +0200 Committer: Alex Antonenko <[email protected]> Committed: Thu Jan 8 23:10:07 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/config.js | 3 +- .../app/controllers/wizard/step4_controller.js | 46 ++++++++++++-------- ambari-web/app/models/stack_service.js | 10 ++++- 3 files changed, 38 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0455aac0/ambari-web/app/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index 6c62a08..a793b5c 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -60,7 +60,8 @@ App.supports = { autoRollbackHA: false, alwaysEnableManagedMySQLForHive: false, automatedKerberos: false, - customizeAgentUserAccount: false + customizeAgentUserAccount: false, + installGanglia: false }; if (App.enableExperimental) { http://git-wip-us.apache.org/repos/asf/ambari/blob/0455aac0/ambari-web/app/controllers/wizard/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js index 3f45014..0f8b998 100644 --- a/ambari-web/app/controllers/wizard/step4_controller.js +++ b/ambari-web/app/controllers/wizard/step4_controller.js @@ -103,6 +103,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ */ submit: function () { if (!this.get('isSubmitDisabled')) { + this.unSelectServices(); this.setGroupedServices(); if (this.validate()) { this.set('errorStack', []); @@ -112,6 +113,13 @@ App.WizardStep4Controller = Em.ArrayController.extend({ }, /** + * Set isSelected based on property doNotShowAndInstall + */ + unSelectServices: function () { + this.filterProperty('isSelected',true).filterProperty('doNotShowAndInstall', true).setEach('isSelected', false); + }, + + /** * Check if validation passed: * - required file system services selected * - dependencies between services @@ -227,25 +235,25 @@ App.WizardStep4Controller = Em.ArrayController.extend({ * @method isFileSystemCheckFailed */ fileSystemServiceValidation: function() { - if(this.isDFSStack()){ - var primaryDFS = this.findProperty('isPrimaryDFS',true); - var primaryDfsDisplayName = primaryDFS.get('displayNameOnSelectServicePage'); - var primaryDfsServiceName = primaryDFS.get('serviceName'); - if (this.multipleDFSs()) { - var dfsServices = this.filterProperty('isDFS',true).filterProperty('isSelected',true).mapProperty('serviceName'); - var services = dfsServices.map(function (item){ - return { - serviceName: item, - selected: item === primaryDfsServiceName - }; - }); - this.addValidationError({ - id: 'multipleDFS', - callback: this.needToAddServicePopup, - callbackParams: [services, 'multipleDFS', primaryDfsDisplayName] - }); - } - } + if(this.isDFSStack()){ + var primaryDFS = this.findProperty('isPrimaryDFS',true); + var primaryDfsDisplayName = primaryDFS.get('displayNameOnSelectServicePage'); + var primaryDfsServiceName = primaryDFS.get('serviceName'); + if (this.multipleDFSs()) { + var dfsServices = this.filterProperty('isDFS',true).filterProperty('isSelected',true).mapProperty('serviceName'); + var services = dfsServices.map(function (item){ + return { + serviceName: item, + selected: item === primaryDfsServiceName + }; + }); + this.addValidationError({ + id: 'multipleDFS', + callback: this.needToAddServicePopup, + callbackParams: [services, 'multipleDFS', primaryDfsDisplayName] + }); + } + } }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/0455aac0/ambari-web/app/models/stack_service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js index 52389e3..c1905d4 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -79,9 +79,17 @@ App.StackService = DS.Model.extend({ isHiddenOnSelectServicePage: function () { var hiddenServices = ['MAPREDUCE2']; - return hiddenServices.contains(this.get('serviceName')) || !this.get('isInstallable'); + return hiddenServices.contains(this.get('serviceName')) || !this.get('isInstallable') || this.get('doNotShowAndInstall'); }.property('serviceName', 'isInstallable'), + doNotShowAndInstall: function () { + var skipServices = []; + if(!App.supports.installGanglia) { + skipServices.push('GANGLIA'); + } + return skipServices.contains(this.get('serviceName')); + }.property('serviceName'), + // Is the service required for monitoring of other hadoop ecosystem services isMonitoringService: function () { var services = ['NAGIOS', 'GANGLIA'];
