소스 검색

AMBARI-13067. Kafka: Add Service Action options for Rolling Restart and Rolling Stop. (jaimin)

Jaimin Jetly 10 년 전
부모
커밋
067d4ee734
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 1
      ambari-web/app/models/stack_service_component.js
  2. 5 5
      ambari-web/app/views/main/service/item.js

+ 1 - 1
ambari-web/app/models/stack_service_component.js

@@ -82,7 +82,7 @@ App.StackServiceComponent = DS.Model.extend({
 
   /** @property {Boolean} isRollinRestartAllowed - component supports rolling restart action **/
   isRollinRestartAllowed: function() {
-    return this.get('isSlave');
+    return this.get('isSlave') || this.get('componentName') === 'KAFKA_BROKER';
   }.property('componentName'),
 
   /** @property {Boolean} isDecommissionAllowed - component supports decommission action **/

+ 5 - 5
ambari-web/app/views/main/service/item.js

@@ -140,12 +140,12 @@ App.MainServiceItemView = Em.View.extend({
         options.push(actionMap.REFRESHQUEUES);
       }
       options.push(actionMap.RESTART_ALL);
-      allSlaves.filter(function (slave) {
-        return App.get('components.rollinRestartAllowed').contains(slave);
-      }).forEach(function(slave) {
+      allSlaves.concat(allMasters).filter(function (_component) {
+        return App.get('components.rollinRestartAllowed').contains(_component);
+      }).forEach(function(_component) {
         options.push(self.createOption(actionMap.ROLLING_RESTART, {
-          context: slave,
-          label: actionMap.ROLLING_RESTART.label.format(App.format.role(slave))
+          context: _component,
+          label: actionMap.ROLLING_RESTART.label.format(App.format.role(_component))
         }));
       });
       allMasters.filter(function(master) {