Repository: ambari Updated Branches: refs/heads/trunk 7c277169f -> a965487c5
AMBARI-5571. Restart option is enabled for components in 'Decommissioned' state but it should not. (Denys Buzhor via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a965487c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a965487c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a965487c Branch: refs/heads/trunk Commit: a965487c5c06b507f5c3b4289ba4e8f0d0515996 Parents: 7c27716 Author: Aleksandr Kovalenko <[email protected]> Authored: Fri Apr 25 17:41:38 2014 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Fri Apr 25 17:41:38 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/details.js | 2 +- .../main/host/details/host_components/decommissionable.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a965487c/ambari-web/app/controllers/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 446e158..5a17dc0 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -1014,7 +1014,7 @@ App.MainHostDetailsController = Em.Controller.extend({ * @param {string} slaveType - slave component name */ warnBeforeDecommission: function(hostNames, serviceName, componentName, slaveType) { - if (this.get('content.hostComponents').findProperty('componentName', componentName).get('passiveState') == "OFF") { + if (App.HostComponent.find().findProperty('componentName', componentName).get('passiveState') == "OFF") { App.ModalPopup.show({ header: Em.I18n.t('common.warning'), message: function(){ http://git-wip-us.apache.org/repos/asf/ambari/blob/a965487c/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js index 6d314de..6222a88 100644 --- a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js +++ b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js @@ -71,6 +71,13 @@ App.Decommissionable = Em.Mixin.create({ }.property('content.service.workStatus'), /** + * @override App.HostComponentView.isRestartableComponent + */ + isRestartableComponent: function() { + return this.get('isComponentDecommissionAvailable') && App.get('components.restartable').contains(this.get('content.componentName')); + }.property('isComponentDecommissionAvailable'), + + /** * Tooltip message shows if decommission/recommission is disabled * when masters for current component is down */ @@ -287,4 +294,4 @@ App.Decommissionable = Em.Mixin.create({ } } }) -}); \ No newline at end of file +});
