Skip to content

Commit ca25b1e

Browse files
sarutaksrowen
authored andcommitted
[SPARK-18837][WEBUI] Very long stage descriptions do not wrap in the UI
## 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 <[email protected]> Closes #16338 from sarutak/SPARK-18837. (cherry picked from commit f2ceb2a) Signed-off-by: Sean Owen <[email protected]>
1 parent 5bafdc4 commit ca25b1e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

core/src/main/resources/org/apache/spark/ui/static/webui.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,8 @@ a.expandbutton {
246246
text-align: center;
247247
margin: 0;
248248
padding: 4px 0;
249+
}
250+
251+
.table-cell-width-limited td {
252+
max-width: 600px;
249253
}

core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ private[ui] class JobPagedTable(
500500
override def tableId: String = jobTag + "-table"
501501

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

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

core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ private[ui] class StagePagedTable(
149149
override def tableId: String = stageTag + "-table"
150150

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

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

0 commit comments

Comments
 (0)