Author: yusaku
Date: Tue Jan 15 20:58:09 2013
New Revision: 1433645
URL: http://svn.apache.org/viewvc?rev=1433645&view=rev
Log:
AMBARI-1188. Refactor isClient computed property for HostComponent class.
(yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/models/host_component.js
incubator/ambari/trunk/ambari-web/app/utils/component.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1433645&r1=1433644&r2=1433645&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Jan 15 20:58:09 2013
@@ -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.
Modified: incubator/ambari/trunk/ambari-web/app/models/host_component.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/host_component.js?rev=1433645&r1=1433644&r2=1433645&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/host_component.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/host_component.js Tue Jan 15
20:58:09 2013
@@ -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(){
Modified: incubator/ambari/trunk/ambari-web/app/utils/component.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/component.js?rev=1433645&r1=1433644&r2=1433645&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/component.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/component.js Tue Jan 15
20:58:09 2013
@@ -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')
}));
});