aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/resources/org
diff options
context:
space:
mode:
authorLiwei Lin <proflin.me@gmail.com>2016-02-25 15:36:25 -0800
committerShixiong Zhu <shixiong@databricks.com>2016-02-25 15:36:25 -0800
commitdc6c5ea4c91c387deb87764c86c4f40ea71657b7 (patch)
tree8e06c9bf242c881c8b37aa0a8f1ad34a66df0fb8 /core/src/main/resources/org
parent35316cb0b744bef9bcb390411ddc321167f953be (diff)
downloadspark-dc6c5ea4c91c387deb87764c86c4f40ea71657b7.tar.gz
spark-dc6c5ea4c91c387deb87764c86c4f40ea71657b7.tar.bz2
spark-dc6c5ea4c91c387deb87764c86c4f40ea71657b7.zip
[SPARK-13468][WEB UI] Fix a corner case where the Stage UI page should show DAG but it doesn't show
When uses clicks more than one time on any stage in the DAG graph on the *Job* web UI page, many new *Stage* web UI pages are opened, but only half of their DAG graphs are expanded. After this PR's fix, every newly opened *Stage* page's DAG graph is expanded. Before: ![](https://cloud.githubusercontent.com/assets/15843379/13279144/74808e86-db10-11e5-8514-cecf31af8908.png) After: ![](https://cloud.githubusercontent.com/assets/15843379/13279145/77ca5dec-db10-11e5-9457-8e1985461328.png) ## What changes were proposed in this pull request? - Removed the `expandDagViz` parameter for _Stage_ page and related codes - Added a `onclick` function setting `expandDagVizArrowKey(false)` as `true` ## How was this patch tested? Manual tests (with this fix) to verified this fix work: - clicked many times on _Job_ Page's DAG Graph → each newly opened Stage page's DAG graph is expanded Manual tests (with this fix) to verified this fix do not break features we already had: - refreshed many times for a same _Stage_ page (whose DAG already expanded) → DAG remained expanded upon every refresh - refreshed many times for a same _Stage_ page (whose DAG unexpanded) → DAG remained unexpanded upon every refresh - refreshed many times for a same _Job_ page (whose DAG already expanded) → DAG remained expanded upon every refresh - refreshed many times for a same _Job_ page (whose DAG unexpanded) → DAG remained unexpanded upon every refresh Author: Liwei Lin <proflin.me@gmail.com> Closes #11368 from proflin/SPARK-13468.
Diffstat (limited to 'core/src/main/resources/org')
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js b/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
index 4337c42087..1b0d4692d9 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js
@@ -222,10 +222,11 @@ function renderDagVizForJob(svgContainer) {
var attemptId = 0
var stageLink = d3.select("#stage-" + stageId + "-" + attemptId)
.select("a.name-link")
- .attr("href") + "&expandDagViz=true";
+ .attr("href");
container = svgContainer
.append("a")
.attr("xlink:href", stageLink)
+ .attr("onclick", "window.localStorage.setItem(expandDagVizArrowKey(false), true)")
.append("g")
.attr("id", containerId);
}