瀏覽代碼

AMBARI-4603 Host names goes under text, icons. (ababiichuk)

aBabiichuk 11 年之前
父節點
當前提交
2ebdc7f15e

+ 0 - 8
ambari-web/app/models/host.js

@@ -97,14 +97,6 @@ App.Host = DS.Model.extend({
     }).length;
   }.property('hostComponents.@each.passiveState'),
 
-  /**
-   * Truncate hostName if it longer than 43 symbols
-   * @returns {String}
-   */
-  publicHostNameFormatted: function() {
-    return this.get('publicHostName').length < 43 ? this.get('publicHostName') : this.get('publicHostName').substr(0, 40) + '...';
-  }.property('publicHostName'),
-
   /**
    * Count of mounted on host disks
    * @returns {Number}

+ 7 - 0
ambari-web/app/styles/application.less

@@ -2929,6 +2929,13 @@ table.graphs {
       overflow-wrap: break-word;
       white-space: nowrap;
     }
+    td.name .trim_hostname{
+      display: block;
+      float: left;
+      width: 90%!important;
+      overflow: hidden;
+      text-overflow: ellipsis;
+    }
     th.first, td.first {
       border-left-width: 1px;
     }

+ 3 - 1
ambari-web/app/templates/main/host.hbs

@@ -98,7 +98,9 @@
           </td>
 
           <td class="name">
-            <a title="{{unbound host.publicHostName}}" href="#" {{action "showDetails" host}}>{{unbound host.publicHostNameFormatted}}</a>
+            <span class="trim_hostname">
+              <a title="{{unbound host.publicHostName}}" href="#" {{action "showDetails" host}}>{{unbound host.publicHostName}}</a>
+            </span>
             {{#if host.criticalAlertsCount}}
               <span class="label label-important alerts-count" {{action "showAlertsPopup" host target="controller"}}>{{host.criticalAlertsCount}}</span>
             {{/if}}

+ 1 - 1
ambari-web/app/templates/main/service/info/summary/master_components.hbs

@@ -19,7 +19,7 @@
 {{#each masterComp in view.mastersComp}}
   <tr>
      <td>
-      <a href="#" {{action showDetails masterComp.host}} title="{{unbound masterComp.host.publicHostNameFormatted}}" rel="UsageTooltip">
+      <a href="#" {{action showDetails masterComp.host}} title="{{unbound masterComp.host.publicHostName}}" rel="UsageTooltip">
        {{#if masterComp.displayNameAdvanced}}
          {{masterComp.displayNameAdvanced}}
        {{else}}