浏览代码

AMBARI-2444. Hosts page: hostname completes with ellipsis even if it is short enough. (Oleg Nechiporenko via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1495224 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 年之前
父节点
当前提交
6aa3319fd7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ambari-web/app/models/host.js

+ 1 - 1
ambari-web/app/models/host.js

@@ -47,7 +47,7 @@ App.Host = DS.Model.extend({
   }.property('App.router.clusterController.alerts.length'),
 
   publicHostNameFormatted: function() {
-    return this.get('publicHostName').substr(0, 20) + ' ...';
+    return this.get('publicHostName').length < 23 ? this.get('publicHostName') : this.get('publicHostName').substr(0, 20) + '...';
   }.property('publicHostName'),
   /**
    * API return diskTotal and diskFree. Need to save their different