Skip to content

Commit

Permalink
[SPARK-10411] [SQL] Move visualization above explain output and hide …
Browse files Browse the repository at this point in the history
…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 <zsxwing@gmail.com>

Closes #8570 from zsxwing/SPARK-10411.
  • Loading branch information
zsxwing authored and Andrew Or committed Sep 3, 2015
1 parent 62b4690 commit 0349b5b
Showing 1 changed file with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
}
Expand Down Expand Up @@ -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/>
}
}

0 comments on commit 0349b5b

Please sign in to comment.