Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2867#discussion_r19572899
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/UIUtils.scala ---
    @@ -247,22 +250,32 @@ private[spark] object UIUtils extends Logging {
         }
         val colWidth = 100.toDouble / headers.size
         val colWidthAttr = if (fixedWidth) colWidth + "%" else ""
    -    val headerRow: Seq[Node] = {
    -      // if none of the headers have "\n" in them
    -      if (headers.forall(!_.contains("\n"))) {
    -        // represent header as simple text
    -        headers.map(h => <th width={colWidthAttr}>{h}</th>)
    +
    +    def getClass(index: Int): String = {
    +      if (index < headerClasses.size) {
    +        headerClasses(index)
           } else {
    -        // represent header text as list while respecting "\n"
    -        headers.map { case h =>
    -          <th width={colWidthAttr}>
    -            <ul class ="unstyled">
    -              { h.split("\n").map { case t => <li> {t} </li> } }
    -            </ul>
    -          </th>
    -        }
    +        ""
    +      }
    +    }
    +
    +    val newlinesInHeader = headers.exists(_.contains("\n"))
    --- End diff --
    
    I could but then it becomes a n^2 computation on the headers, because it 
has to scan through all of the headers each time it adds new header content.  n 
is not huge so maybe a non-issue; would you still prefer inlining it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to