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

    https://github.com/apache/spark/pull/20663#discussion_r170408040
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala 
---
    @@ -143,76 +72,105 @@ private[ui] class AllStagesPage(parent: StagesTab) 
extends WebUIPage("") {
               Seq.empty[Node]
             }
           }
    -    if (shouldShowActiveStages) {
    -      content ++=
    -        <span id="active" class="collapse-aggregated-allActiveStages 
collapse-table"
    -            onClick="collapseTable('collapse-aggregated-allActiveStages',
    -            'aggregated-allActiveStages')">
    -          <h4>
    -            <span class="collapse-table-arrow arrow-open"></span>
    -            <a>Active Stages ({activeStages.size})</a>
    -          </h4>
    -        </span> ++
    -        <div class="aggregated-allActiveStages collapsible-table">
    -          {activeStagesTable.toNodeSeq}
    -        </div>
    -    }
    -    if (shouldShowPendingStages) {
    -      content ++=
    -        <span id="pending" class="collapse-aggregated-allPendingStages 
collapse-table"
    -            onClick="collapseTable('collapse-aggregated-allPendingStages',
    -            'aggregated-allPendingStages')">
    -          <h4>
    -            <span class="collapse-table-arrow arrow-open"></span>
    -            <a>Pending Stages ({pendingStages.size})</a>
    -          </h4>
    -        </span> ++
    -        <div class="aggregated-allPendingStages collapsible-table">
    -          {pendingStagesTable.toNodeSeq}
    -        </div>
    +
    +    tables.flatten.foreach(content ++= _)
    --- End diff --
    
    `content ++= tables.flatten`?
    
    But I think this would be better as:
    
    ```
    val summary = blah
    val pools = if (sc.isDefined && isFairScheduler) ... else ...
    val stages = tables.flatten
    
    val content = summary ++ pools ++ stages
    ```


---

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

Reply via email to