mirror of https://github.com/rancher/ui.git
Show only first label of hostname
This commit is contained in:
parent
e8ef022974
commit
ccecfa112e
|
|
@ -91,7 +91,17 @@ var Host = Resource.extend(StateCounts,{
|
||||||
displayIp: Ember.computed.alias('agentIpAddress'),
|
displayIp: Ember.computed.alias('agentIpAddress'),
|
||||||
|
|
||||||
displayName: function() {
|
displayName: function() {
|
||||||
return this.get('name') || this.get('hostname') || '('+this.get('id')+')';
|
let name = this.get('name');
|
||||||
|
if ( name ) {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
name = this.get('hostname');
|
||||||
|
if ( name ) {
|
||||||
|
return name.replace(/\..*$/,'');
|
||||||
|
}
|
||||||
|
|
||||||
|
return '('+this.get('id')+')';
|
||||||
}.property('name','hostname','id'),
|
}.property('name','hostname','id'),
|
||||||
|
|
||||||
osBlurb: function() {
|
osBlurb: function() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue