Skip to content

Commit

Permalink
[SPARK-18837][WEBUI] Very long stage descriptions do not wrap in the UI
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

This issue was reported by wangyum.

In the AllJobsPage, JobPage and StagePage, the description length was limited before like as follows.

![ui-2 0 0](https://cloud.githubusercontent.com/assets/4736016/21319673/8b225246-c651-11e6-9041-4fcdd04f4dec.gif)

But recently, the limitation seems to have been accidentally removed.

![ui-2 1 0](https://cloud.githubusercontent.com/assets/4736016/21319825/104779f6-c652-11e6-8bfa-dfd800396352.gif)

The cause is that some tables are no longer `sortable` class although they were, and `sortable` class does not only mark tables as sortable but also limited the width of their child `td` elements.
The reason why now some tables are not `sortable` class is because another sortable mechanism was introduced by #13620 and #13708 with pagination feature.

To fix this issue, I've introduced new class `table-cell-width-limited` which limits the description cell width and the description is like what it was.

<img width="1260" alt="2016-12-20 1 00 34" src="https://cloud.githubusercontent.com/assets/4736016/21320478/89141c7a-c654-11e6-8494-f8f91325980b.png">

## How was this patch tested?

Tested manually with my browser.

Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>

Closes #16338 from sarutak/SPARK-18837.

(cherry picked from commit f2ceb2a)
Signed-off-by: Sean Owen <sowen@cloudera.com>
  • Loading branch information
sarutak authored and srowen committed Dec 24, 2016
1 parent 5bafdc4 commit ca25b1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions core/src/main/resources/org/apache/spark/ui/static/webui.css
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,8 @@ a.expandbutton {
text-align: center;
margin: 0;
padding: 4px 0;
}

.table-cell-width-limited td {
max-width: 600px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ private[ui] class JobPagedTable(
override def tableId: String = jobTag + "-table"

override def tableCssClass: String =
"table table-bordered table-condensed table-striped table-head-clickable"
"table table-bordered table-condensed table-striped " +
"table-head-clickable table-cell-width-limited"

override def pageSizeFormField: String = jobTag + ".pageSize"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ private[ui] class StagePagedTable(
override def tableId: String = stageTag + "-table"

override def tableCssClass: String =
"table table-bordered table-condensed table-striped table-head-clickable"
"table table-bordered table-condensed table-striped " +
"table-head-clickable table-cell-width-limited"

override def pageSizeFormField: String = stageTag + ".pageSize"

Expand Down

0 comments on commit ca25b1e

Please sign in to comment.