|
@@ -631,24 +631,6 @@ App.HostPopup = Em.Object.create({
|
|
|
return hostsMap;
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * Get hostname to display: return "n/a" for safety measure if hostname is null
|
|
|
- * return "Ambari Server Host" if task role is AMBARI_SERVER_ACTION
|
|
|
- * @param {Array} tasks
|
|
|
- * @param {String} hostname
|
|
|
- * @return {String} hostname to display
|
|
|
- */
|
|
|
- getDisplayHostname: function (hostname, tasks) {
|
|
|
- if ((!hostname || hostname == "null") && tasks.someProperty('Tasks.role', Em.I18n.t('hostPopup.Tasks.role.ambariServerAction'))) {
|
|
|
- // change hostname to "ambari server host"
|
|
|
- return Em.I18n.t('hostPopup.Hosts.ambariServerHost');
|
|
|
- } else if ((!hostname || hostname == "null")){
|
|
|
- // just for safety measure
|
|
|
- return Em.I18n.t('common.na');
|
|
|
- }
|
|
|
- return hostname;
|
|
|
- },
|
|
|
-
|
|
|
/**
|
|
|
*
|
|
|
* @param {object} hostsMap
|
|
@@ -668,12 +650,8 @@ App.HostPopup = Em.Object.create({
|
|
|
var hostInfo = Em.Object.create({
|
|
|
name: hostName,
|
|
|
publicName: _host.publicName,
|
|
|
- publicNameDisplay: function () {
|
|
|
- return self.getDisplayHostname(this.get('publicName'), tasks);
|
|
|
- }.property('publicName'),
|
|
|
displayName: function () {
|
|
|
- var name = self.getDisplayHostname(this.get('name'), tasks);
|
|
|
- return name.length < 43 ? name : (name.substr(0, 40) + '...');
|
|
|
+ return this.get('name').length < 43 ? this.get('name') : (this.get('name').substr(0, 40) + '...');
|
|
|
}.property('name'),
|
|
|
progress: 0,
|
|
|
status: App.format.taskStatus("PENDING"),
|