aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/resources/org
diff options
context:
space:
mode:
authorCarson Wang <carson.wang@intel.com>2015-08-11 23:25:02 -0700
committerAndrew Or <andrew@databricks.com>2015-08-11 23:25:02 -0700
commitbab89232854de7554e88f29cab76f1a1c349edc1 (patch)
tree202a6c8d91c2beb7e890cb01ed694b274d3950bf /core/src/main/resources/org
parent4e3f4b934f74e8c7c06f4940d6381343f9fd4918 (diff)
downloadspark-bab89232854de7554e88f29cab76f1a1c349edc1.tar.gz
spark-bab89232854de7554e88f29cab76f1a1c349edc1.tar.bz2
spark-bab89232854de7554e88f29cab76f1a1c349edc1.zip
[SPARK-9426] [WEBUI] Job page DAG visualization is not shown
To reproduce the issue, go to the stage page and click DAG Visualization once, then go to the job page to show the job DAG visualization. You will only see the first stage of the job. Root cause: the java script use local storage to remember your selection. Once you click the stage DAG visualization, the local storage set `expand-dag-viz-arrow-stage` to true. When you go to the job page, the js checks `expand-dag-viz-arrow-stage` in the local storage first and will try to show stage DAG visualization on the job page. To fix this, I set an id to the DAG span to differ job page and stage page. In the js code, we check the id and local storage together to make sure we show the correct DAG visualization. Author: Carson Wang <carson.wang@intel.com> Closes #8104 from carsonwang/SPARK-9426.
Diffstat (limited to 'core/src/main/resources/org')
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js8
1 files changed, 4 insertions, 4 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 4a893bc018..83dbea40b6 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
@@ -109,13 +109,13 @@ function toggleDagViz(forJob) {
}
$(function (){
- if (window.localStorage.getItem(expandDagVizArrowKey(false)) == "true") {
+ if ($("#stage-dag-viz").length &&
+ window.localStorage.getItem(expandDagVizArrowKey(false)) == "true") {
// Set it to false so that the click function can revert it
window.localStorage.setItem(expandDagVizArrowKey(false), "false");
toggleDagViz(false);
- }
-
- if (window.localStorage.getItem(expandDagVizArrowKey(true)) == "true") {
+ } else if ($("#job-dag-viz").length &&
+ window.localStorage.getItem(expandDagVizArrowKey(true)) == "true") {
// Set it to false so that the click function can revert it
window.localStorage.setItem(expandDagVizArrowKey(true), "false");
toggleDagViz(true);