Updated Branches: refs/heads/trunk b945179bd -> c16d009a9
AMBARI-3551: Reassign Master: option for the wizard should be hidden on single node cluster. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/c16d009a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/c16d009a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/c16d009a Branch: refs/heads/trunk Commit: c16d009a96b6a06668a5305c0aff6d25800449a1 Parents: b945179 Author: Jaimin Jetly <[email protected]> Authored: Fri Oct 18 16:21:27 2013 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Fri Oct 18 16:21:27 2013 -0700 ---------------------------------------------------------------------- .../controllers/main/admin/highAvailability_controller.js | 9 +++++---- ambari-web/app/views/main/service/item.js | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c16d009a/ambari-web/app/controllers/main/admin/highAvailability_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js index c8e10e6..08ba972 100644 --- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js +++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js @@ -34,14 +34,15 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({ this.showErrorPopup(Em.I18n.t('admin.highAvailability.error.security')); return; } else { - if (App.Host.find().content.length < 3) { - message.push(Em.I18n.t('admin.highAvailability.error.hostsNum')); + if (App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('workStatus') !== 'STARTED') { + message.push(Em.I18n.t('admin.highAvailability.error.namenodeStarted')); } if (App.HostComponent.find().filterProperty('componentName', 'ZOOKEEPER_SERVER').length < 3) { message.push(Em.I18n.t('admin.highAvailability.error.zooKeeperNum')); } - if (App.HostComponent.find().findProperty('componentName', 'NAMENODE').get('workStatus') !== 'STARTED') { - message.push(Em.I18n.t('admin.highAvailability.error.namenodeStarted')); + + if (App.Host.find().content.length < 3) { + message.push(Em.I18n.t('admin.highAvailability.error.hostsNum')); } if (message.length > 0) { this.showErrorPopup(message); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/c16d009a/ambari-web/app/views/main/service/item.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js index 1db8c5e..6826b35 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -23,6 +23,7 @@ App.MainServiceItemView = Em.View.extend({ maintenance: function(){ var options = []; var service = this.get('controller.content'); + var hosts = App.Host.find().content.length; var allMasters = this.get('controller.content.hostComponents').filterProperty('isMaster').mapProperty('componentName').uniq(); var reassignableMasters = ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER']; switch (service.get('serviceName')) { @@ -32,7 +33,7 @@ App.MainServiceItemView = Em.View.extend({ case 'YARN': case 'HDFS': case 'MAPREDUCE': - if (App.supports.reassignMaster) { + if (App.supports.reassignMaster && hosts > 1) { allMasters.forEach(function (hostComponent) { if (reassignableMasters.contains(hostComponent)) { options.push({action: 'reassignMaster', context: hostComponent,
