소스 검색

AMBARI-4699. Add ability to restart a component from "Host Details" page. (Mikhail Bayuk via alexantonenko)

Alex Antonenko 11 년 전
부모
커밋
d864d2a048
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      ambari-web/app/app.js

+ 7 - 4
ambari-web/app/app.js

@@ -205,19 +205,22 @@ module.exports = Em.Application.create({
    */
   components: Ember.Object.create({
     reassignable: ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER'],
-    restartable: ['APP_TIMELINE_SERVER'],
+    restartable: function() {
+      return this.get('masters');
+    }.property('masters'),
     deletable: ['SUPERVISOR', 'HBASE_MASTER', 'DATANODE', 'TASKTRACKER', 'NODEMANAGER', 'HBASE_REGIONSERVER'],
     rollinRestartAllowed: ["DATANODE", "TASKTRACKER", "NODEMANAGER", "HBASE_REGIONSERVER", "SUPERVISOR"],
     decommissionAllowed: ["DATANODE", "TASKTRACKER", "NODEMANAGER", "HBASE_REGIONSERVER"],
     addableToHost: ["DATANODE", "TASKTRACKER", "NODEMANAGER", "HBASE_REGIONSERVER", "HBASE_MASTER", "ZOOKEEPER_SERVER", "SUPERVISOR"],
     slaves: function() {
       return require('data/service_components').filter(function(component){
-        return !component.isClient && !component.isMaster
-      }).mapProperty('component_name').uniq().without("DASHBOARD");
+        return !component.isClient && !component.isMaster;
+      }).mapProperty('component_name').uniq().without("DASHBOARD").without("MYSQL_SERVER");
     }.property().cacheable(),
 
     masters: function() {
-      return require('data/service_components').filterProperty('isMaster', true).mapProperty('component_name').uniq();
+      return require('data/service_components').filterProperty('isMaster', true)
+        .mapProperty('component_name').concat(['MYSQL_SERVER']).uniq();
     }.property().cacheable(),
     clients: function() {
       return require('data/service_components').filterProperty('isClient', true).mapProperty('component_name').uniq();