ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-6648 ATS should not be in actions menu for rolling restart. (atkach)
Date Tue, 29 Jul 2014 09:32:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7d2c4f00f -> 05e5476c7


AMBARI-6648 ATS should not be in actions menu for rolling restart. (atkach)


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

Branch: refs/heads/trunk
Commit: 05e5476c72582c6722fdcbaf7bf7917293c9ffc0
Parents: 7d2c4f0
Author: atkach <atkach@hortonworks.com>
Authored: Tue Jul 29 12:29:15 2014 +0300
Committer: atkach <atkach@hortonworks.com>
Committed: Tue Jul 29 12:29:15 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/app.js                        | 4 ++++
 ambari-web/app/views/main/service/item.js    | 4 +++-
 ambari-web/app/views/main/service/service.js | 6 ++++--
 3 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5476c/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 47aa25b..1964207 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -188,6 +188,10 @@ module.exports = Em.Application.create({
 
     clients: function () {
       return App.StackServiceComponent.find().filterProperty('isClient').mapProperty('componentName')
+    }.property('App.router.clusterController.isLoaded'),
+
+    masterBehavior: function () {
+      return App.StackServiceComponent.find().filterProperty('isMasterBehavior').mapProperty('componentName')
     }.property('App.router.clusterController.isLoaded')
   })
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5476c/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 0b780a4..a8bbd64 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -128,7 +128,9 @@ App.MainServiceItemView = Em.View.extend({
         options.push(actionMap.REFRESH_YARN_QUEUE);
       }
       options.push(actionMap.RESTART_ALL);
-      allSlaves.forEach(function(slave) {
+      allSlaves.filter(function (slave) {
+        return App.get('components.rollinRestartAllowed').contains(slave);
+      }).forEach(function(slave) {
         options.push(self.createOption(actionMap.ROLLING_RESTART, {
           context: slave,
           label: actionMap.ROLLING_RESTART.label.format(App.format.role(slave))

http://git-wip-us.apache.org/repos/asf/ambari/blob/05e5476c/ambari-web/app/views/main/service/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/service.js b/ambari-web/app/views/main/service/service.js
index 7f48ac9..b19ac0d 100644
--- a/ambari-web/app/views/main/service/service.js
+++ b/ambari-web/app/views/main/service/service.js
@@ -133,8 +133,10 @@ App.MainDashboardServiceView = Em.View.extend({
       App.tooltip($('[rel=healthTooltip]'));
     },
     templateName: require('templates/main/service/info/summary/master_components'),
-    mastersComp : function(){
-     return this.get('parentView.service.hostComponents').filterProperty('isMaster', true);
+    mastersComp: function () {
+      return this.get('parentView.service.hostComponents').filter(function (component) {
+        return component.get('isMaster') || App.get('components.masterBehavior').contains(component.get('componentName'));
+      });
     }.property("service")
   }),
 


Mime
View raw message