mma-server/src/main/resources/com/aliyun/odps/mma/server/ui/static/dag-viz.js
/*
 * Show or hide the RDD DAG visualization.
 *
 * The graph is only rendered the first time this is called.
 * This is the narrow interface called from the Scala UI code.
 */
Show or hide the RDD DAG visualization.
The graph is only rendered the first time this is called.
This is the narrow interface called from the Scala UI code.
Show or hide the RDD DAG visualization . The graph is only rendered the first time this is called . This is the narrow interface called from the Scala UI code .
function toggleDagViz() {
  var status = window.localStorage.getItem(expandDagVizArrowKey()) == "true";
  status = !status;
  var arrowSelector = ".expand-dag-viz-arrow";
  $(arrowSelector).toggleClass('arrow-closed');
  $(arrowSelector).toggleClass('arrow-open');
  var shouldShow = $(arrowSelector).hasClass("arrow-open");
  if (shouldShow) {
    var shouldRender = graphContainer().select("*").empty();
    if (shouldRender) {
      renderDagViz();
    }
    graphContainer().style("display", "block");
  } else {
    graphContainer().style("display", "none");
  }
  window.localStorage.setItem(expandDagVizArrowKey(), "" + status);
}
function toggleDagViz ( ) { var status = window . localStorage . getItem ( expandDagVizArrowKey ( ) ) == "true" ; status = ! status ; var arrowSelector = ".expand-dag-viz-arrow" ; $ ( arrowSelector ) . toggleClass ( 'arrow-closed' ) ; $ ( arrowSelector ) . toggleClass ( 'arrow-open' ) ; var shouldShow = $ ( arrowSelector ) . hasClass ( "arrow-open" ) ; if ( shouldShow ) { var shouldRender = graphContainer ( ) . select ( "*" ) . empty ( ) ; if ( shouldRender ) { renderDagViz ( ) ; } graphContainer ( ) . style ( "display" , "block" ) ; } else { graphContainer ( ) . style ( "display" , "none" ) ; } window . localStorage . setItem ( expandDagVizArrowKey ( ) , "" + status ) ; }
Show or hide the RDD DAG visualization.
Show or hide the RDD DAG visualization .
// Save the graph for later so we don't have to render it again