You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2014/10/09 09:00:28 UTC
git commit: [SPARK-3844][UI] Truncate appName in WebUI if it is too
long
Repository: spark
Updated Branches:
refs/heads/master b9df8af62 -> 86b392942
[SPARK-3844][UI] Truncate appName in WebUI if it is too long
Truncate appName in WebUI if it is too long.
Author: Xiangrui Meng <me...@databricks.com>
Closes #2707 from mengxr/truncate-app-name and squashes the following commits:
87834ce [Xiangrui Meng] move scala import below java
c7111dc [Xiangrui Meng] truncate appName in WebUI if it is too long
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/86b39294
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/86b39294
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/86b39294
Branch: refs/heads/master
Commit: 86b392942daf61fed2ff7490178b128107a0e856
Parents: b9df8af
Author: Xiangrui Meng <me...@databricks.com>
Authored: Thu Oct 9 00:00:24 2014 -0700
Committer: Andrew Or <an...@gmail.com>
Committed: Thu Oct 9 00:00:24 2014 -0700
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/ui/UIUtils.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/86b39294/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
index be69060..32e6b15 100644
--- a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala
@@ -21,6 +21,7 @@ import java.text.SimpleDateFormat
import java.util.{Locale, Date}
import scala.xml.Node
+
import org.apache.spark.Logging
/** Utility functions for generating XML pages with spark content. */
@@ -169,6 +170,7 @@ private[spark] object UIUtils extends Logging {
refreshInterval: Option[Int] = None): Seq[Node] = {
val appName = activeTab.appName
+ val shortAppName = if (appName.length < 36) appName else appName.take(32) + "..."
val header = activeTab.headerTabs.map { tab =>
<li class={if (tab == activeTab) "active" else ""}>
<a href={prependBaseUri(activeTab.basePath, "/" + tab.prefix)}>{tab.name}</a>
@@ -187,7 +189,9 @@ private[spark] object UIUtils extends Logging {
<img src={prependBaseUri("/static/spark-logo-77x50px-hd.png")} />
</a>
<ul class="nav">{header}</ul>
- <p class="navbar-text pull-right"><strong>{appName}</strong> application UI</p>
+ <p class="navbar-text pull-right">
+ <strong title={appName}>{shortAppName}</strong> application UI
+ </p>
</div>
</div>
<div class="container-fluid">
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org