Переглянути джерело

AMBARI-1188. Refactor isClient computed property for HostComponent class. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1433645 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 роки тому
батько
коміт
99bcb4c73c

+ 3 - 0
CHANGES.txt

@@ -17,6 +17,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-1188. Refactor isClient computed property for HostComponent class.
+ (yusaku)
+
  AMBARI-1186. Add Run class to represent a job run. (yusaku)
 
  AMBARI-1185. Refactor the method to check if the user is an admin.

+ 4 - 0
ambari-web/app/models/host_component.js

@@ -24,6 +24,10 @@ App.HostComponent = DS.Model.extend({
   host: DS.belongsTo('App.Host'),
   service: DS.belongsTo('App.Service'),
   isClient:function () {
+    if(['PIG', 'SQOOP', 'HCAT'].contains(this.get('componentName'))){
+      return true;
+    }
+
     return Boolean(this.get('componentName').match(/_client/gi));
   }.property('componentName'),
   isRunning: function(){

+ 1 - 1
ambari-web/app/utils/component.js

@@ -45,7 +45,7 @@ module.exports = {
         id: componentName,
         isMaster: component.get('isMaster'),
         isSlave: component.get('isSlave'),
-        isClient: !component.get('isMaster') && !component.get('isSlave'),
+        isClient: component.get('isClient'),
         displayName: component.get('displayName')
       }));
     });