You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/12/12 19:17:19 UTC

git commit: AMBARI-3999. Long host names are inconvenient for viewing in background operations popup. (xiwang via yusaku)

Updated Branches:
  refs/heads/trunk d1cbbdb13 -> bbd150371


AMBARI-3999. Long host names are inconvenient for viewing in background operations popup. (xiwang via yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bbd15037
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bbd15037
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bbd15037

Branch: refs/heads/trunk
Commit: bbd15037143d9e11fd1408a2c7395a9bb9f21150
Parents: d1cbbdb
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Dec 12 10:16:55 2013 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Dec 12 10:16:55 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/styles/application.less                  | 1 +
 ambari-web/app/templates/common/host_progress_popup.hbs | 2 +-
 ambari-web/app/utils/host_progress_popup.js             | 5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd15037/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 09c1fcb..582b4b4 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1361,6 +1361,7 @@ width:100%;
     .host-name-icon-wrap{
       float: left;
       width: 50%;
+      white-space: nowrap;
     }
     .log-list-wrap {
       padding: 10px 10px 10px 20px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd15037/ambari-web/app/templates/common/host_progress_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/host_progress_popup.hbs b/ambari-web/app/templates/common/host_progress_popup.hbs
index a383c8e..7e43c9c 100644
--- a/ambari-web/app/templates/common/host_progress_popup.hbs
+++ b/ambari-web/app/templates/common/host_progress_popup.hbs
@@ -92,7 +92,7 @@
               <div class="host-name-icon-wrap">
                 <i {{bindAttr class="hostInfo.status hostInfo.icon"}}></i>
                 <a href="#">
-                  {{hostInfo.name}}
+                  {{hostInfo.displayName}}
                 </a>
               </div>
               <div class="progress-bar span2">

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd15037/ambari-web/app/utils/host_progress_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js
index 31ec071..bb34c1a 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -394,6 +394,9 @@ App.HostPopup = Em.Object.create({
           var hostInfo = Ember.Object.create({
             name: hostName,
             publicName: _host.publicName,
+            displayName: function () {
+              return this.get('name').length < 43 ? this.get('name') : (this.get('name').substr(0, 40) + '...');
+            }.property('name'),
             progress: 0,
             status: App.format.taskStatus("PENDING"),
             serviceName: _host.serviceName,
@@ -530,7 +533,7 @@ App.HostPopup = Em.Object.create({
         isHostEmptyList: true,
         isTasksEmptyList: true,
         controller: this,
-        hosts: self.get("hosts"),
+        hosts: self.get('hosts'),
         services: self.get('servicesInfo'),
 
         tasks: function () {