Procházet zdrojové kódy

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

atkach před 11 roky
rodič
revize
05e5476c72

+ 4 - 0
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')
   })
 });

+ 3 - 1
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))

+ 4 - 2
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")
   }),