Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 3895968b7 -> 432a3d972


AMBARI-14794: Stop HAWQ Cluster Immediate command should be disabled if 
HAWQMASTER is stopped (adenissov via jaoki)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/432a3d97
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/432a3d97
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/432a3d97

Branch: refs/heads/branch-2.2
Commit: 432a3d972f428f6e9624aa5b9173ffde7289e92b
Parents: 3895968
Author: Jun Aoki <ja...@apache.org>
Authored: Thu Jan 28 17:41:01 2016 -0800
Committer: Jun Aoki <ja...@apache.org>
Committed: Thu Jan 28 17:41:01 2016 -0800

----------------------------------------------------------------------
 ambari-web/app/models/host_component.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/432a3d97/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js 
b/ambari-web/app/models/host_component.js
index b76da20..bc481b5 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -263,6 +263,7 @@ App.HostComponentStatus = {
 
 App.HostComponentActionMap = {
   getMap: function(ctx) {
+    var HM = 
ctx.get('controller.content.hostComponents').findProperty('componentName', 
'HAWQMASTER');
     var HS = 
ctx.get('controller.content.hostComponents').findProperty('componentName', 
'HAWQSTANDBY');
     return {
       RESTART_ALL: {
@@ -372,7 +373,7 @@ App.HostComponentActionMap = {
         context: 
Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'),
         label: 
Em.I18n.t('services.service.actions.run.immediateStopHawqCluster.context'),
         cssClass: 'icon-stop',
-        disabled: false
+        disabled: !HM || HM.get('workStatus') != 
App.HostComponentStatus.started
       },
       IMMEDIATE_STOP: {
         customCommand: 'IMMEDIATE_STOP',

Reply via email to