Updated Branches:
  refs/heads/trunk a6f6d20ad -> 89f4ef3d0

AMBARI-3915. Stop/Start components action in service configs not calculating 
correctly. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 89f4ef3d0ebb1064888cf7850874de03f6136992
Parents: a6f6d20
Author: Aleksandr Kovalenko <[email protected]>
Authored: Thu Nov 28 16:31:53 2013 +0200
Committer: Aleksandr Kovalenko <[email protected]>
Committed: Thu Nov 28 16:31:53 2013 +0200

----------------------------------------------------------------------
 .../app/views/main/service/info/configs.js      | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/89f4ef3d/ambari-web/app/views/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/configs.js 
b/ambari-web/app/views/main/service/info/configs.js
index 0e7ee89..28c8f6d 100644
--- a/ambari-web/app/views/main/service/info/configs.js
+++ b/ambari-web/app/views/main/service/info/configs.js
@@ -31,22 +31,22 @@ App.MainServiceInfoConfigsView = Em.View.extend({
 
 
   stopComponentsIsDisabled: function () {
-    var controller = this.get('controller');
-    if(controller.get('content.healthStatus') == 'green'){
-      return false;
-    }else{
+    var staleComponents = 
this.get('controller.content.hostComponents').filterProperty('staleConfigs', 
true).filterProperty('isClient', false);
+    if (!staleComponents.findProperty('workStatus', 'STARTED')) {
       return true;
+    } else {
+      return false;
     }
-  }.property('controller.content.healthStatus'),
+  }.property('[email protected]', 
'[email protected]'),
 
-  startComponentsIsDisabled:function () {
-    var controller = this.get('controller');
-    if(controller.get('content.healthStatus') == 'red'){
-      return false;
-    }else{
+  startComponentsIsDisabled: function () {
+    var staleComponents = 
this.get('controller.content.hostComponents').filterProperty('staleConfigs', 
true).filterProperty('isClient', false);
+    if (!staleComponents.findProperty('workStatus', 'INSTALLED')) {
       return true;
+    } else {
+      return false;
     }
-  }.property('controller.content.healthStatus'),
+  }.property('[email protected]', 
'[email protected]'),
 
   calculateCounts: function() {
     var hc = this.get('controller.content.restartRequiredHostsAndComponents');

Reply via email to