Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package org.apache.spark.sql.execution.ui
import javax.servlet.http.HttpServletRequest

import scala.collection.mutable
import scala.xml.Node
import scala.xml.{Node, NodeSeq}

import org.apache.commons.lang3.StringEscapeUtils

Expand All @@ -38,19 +38,19 @@ private[ui] class AllExecutionsPage(parent: SQLTab) extends WebUIPage("") with L
if (listener.getRunningExecutions.nonEmpty) {
_content ++=
new RunningExecutionTable(
parent, "Running Queries", currentTime,
parent, s"Running Queries (${listener.getRunningExecutions.size})", currentTime,
listener.getRunningExecutions.sortBy(_.submissionTime).reverse).toNodeSeq
}
if (listener.getCompletedExecutions.nonEmpty) {
_content ++=
new CompletedExecutionTable(
parent, "Completed Queries", currentTime,
parent, s"Completed Queries (${listener.getCompletedExecutions.size})", currentTime,
listener.getCompletedExecutions.sortBy(_.submissionTime).reverse).toNodeSeq
}
if (listener.getFailedExecutions.nonEmpty) {
_content ++=
new FailedExecutionTable(
parent, "Failed Queries", currentTime,
parent, s"Failed Queries (${listener.getFailedExecutions.size})", currentTime,
listener.getFailedExecutions.sortBy(_.submissionTime).reverse).toNodeSeq
}
_content
Expand All @@ -61,7 +61,36 @@ private[ui] class AllExecutionsPage(parent: SQLTab) extends WebUIPage("") with L
details.parentNode.querySelector('.stage-details').classList.toggle('collapsed')
}}
</script>
UIUtils.headerSparkPage("SQL", content, parent, Some(5000))
val summary: NodeSeq =
<div>
<ul class="unstyled">
{
if (listener.getRunningExecutions.nonEmpty) {
<li>
<a href="#running-execution-table"><strong>Running Queries:</strong></a>
{listener.getRunningExecutions.size}
</li>
}
}
{
if (listener.getCompletedExecutions.nonEmpty) {
<li>
<a href="#completed-execution-table"><strong>Completed Queries:</strong></a>
{listener.getCompletedExecutions.size}
</li>
}
}
{
if (listener.getFailedExecutions.nonEmpty) {
<li>
<a href="#failed-execution-table"><strong>Failed Queries:</strong></a>
{listener.getFailedExecutions.size}
</li>
}
}
</ul>
</div>
UIUtils.headerSparkPage("SQL", summary ++ content, parent, Some(5000))
}
}

Expand Down