Repository: spark Updated Branches: refs/heads/branch-1.5 b846a9dc3 -> 94404ee53
[SPARK-10411] [SQL] Move visualization above explain output and hide explain by default New screenshots after this fix: <img width="627" alt="s1" src="https://cloud.githubusercontent.com/assets/1000778/9625782/4b2dba36-518b-11e5-9104-c713ff026e3d.png"> Default: <img width="462" alt="s2" src="https://cloud.githubusercontent.com/assets/1000778/9625817/92366e50-518b-11e5-9981-cdfb774d66b8.png"> After clicking `+details`: <img width="377" alt="s3" src="https://cloud.githubusercontent.com/assets/1000778/9625784/4ba24342-518b-11e5-8522-846a16a95d44.png"> Author: zsxwing <[email protected]> Closes #8570 from zsxwing/SPARK-10411. (cherry picked from commit 0349b5b4383cf813bea4e1053bcc4e0268603743) Signed-off-by: Andrew Or <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/94404ee5 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/94404ee5 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/94404ee5 Branch: refs/heads/branch-1.5 Commit: 94404ee53f382afae345ce2a30c0df657f00eee5 Parents: b846a9d Author: zsxwing <[email protected]> Authored: Wed Sep 2 22:17:39 2015 -0700 Committer: Andrew Or <[email protected]> Committed: Wed Sep 2 22:17:48 2015 -0700 ---------------------------------------------------------------------- .../spark/sql/execution/ui/ExecutionPage.scala | 27 ++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/94404ee5/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala index f0b56c2..a4dbd2e 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala @@ -74,16 +74,14 @@ private[sql] class ExecutionPage(parent: SQLTab) extends WebUIPage("execution") }} </li> }} - <li> - <strong>Detail: </strong><br/> - <pre>{executionUIData.physicalPlanDescription}</pre> - </li> </ul> </div> val metrics = listener.getExecutionMetrics(executionId) - summary ++ planVisualization(metrics, executionUIData.physicalPlanGraph) + summary ++ + planVisualization(metrics, executionUIData.physicalPlanGraph) ++ + physicalPlanDescription(executionUIData.physicalPlanDescription) }.getOrElse { <div>No information to display for Plan {executionId}</div> } @@ -124,4 +122,23 @@ private[sql] class ExecutionPage(parent: SQLTab) extends WebUIPage("execution") private def jobURL(jobId: Long): String = "%s/jobs/job?id=%s".format(UIUtils.prependBaseUri(parent.basePath), jobId) + + private def physicalPlanDescription(physicalPlanDescription: String): Seq[Node] = { + <div> + <span style="cursor: pointer;" onclick="clickPhysicalPlanDetails();"> + <span id="physical-plan-details-arrow" class="arrow-closed"></span> + <a>Details</a> + </span> + </div> + <div id="physical-plan-details" style="display: none;"> + <pre>{physicalPlanDescription}</pre> + </div> + <script> + function clickPhysicalPlanDetails() {{ + $('#physical-plan-details').toggle(); + $('#physical-plan-details-arrow').toggleClass('arrow-open').toggleClass('arrow-closed'); + }} + </script> + <br/> + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
