mma-server/src/main/resources/com/aliyun/odps/mma/server/ui/static/dag-viz.js
/* (Job page only) Helper function to add tooltips for RDDs. */
(Job page only) Helper function to add tooltips for RDDs.
( Job page only ) Helper function to add tooltips for RDDs .
function addTooltipsForRDDs(svgContainer) {
  svgContainer.selectAll("g.node").each(function() {
    var node = d3.select(this);
    var tooltipText = replaceLineBreak(node.attr("name"));
    if (tooltipText) {
      node.select("circle")
      .attr("data-toggle", "tooltip")
      .attr("data-placement", "bottom")
      .attr("data-html", "true") 
      .attr("title", tooltipText);
    }
    node.on("mouseenter", function() { triggerTooltipForRDD(node, true); });
    node.on("mouseleave", function() { triggerTooltipForRDD(node, false); });
  });
  $("[data-toggle=tooltip]")
  .filter("g.node circle")
  .tooltip({ container: "body", trigger: "manual" });
}
function addTooltipsForRDDs ( svgContainer ) { svgContainer . selectAll ( "g.node" ) . each ( function ( ) { var node = d3 . select ( this ) ; var tooltipText = replaceLineBreak ( node . attr ( "name" ) ) ; if ( tooltipText ) { node . select ( "circle" ) . attr ( "data-toggle" , "tooltip" ) . attr ( "data-placement" , "bottom" ) . attr ( "data-html" , "true" ) . attr ( "title" , tooltipText ) ; } node . on ( "mouseenter" , function ( ) { triggerTooltipForRDD ( node , true ) ; } ) ; node . on ( "mouseleave" , function ( ) { triggerTooltipForRDD ( node , false ) ; } ) ; } ) ; $ ( "[data-toggle=tooltip]" ) . filter ( "g.node circle" ) . tooltip ( { container : "body" , trigger : "manual" } ) ; }
(Job page only) Helper function to add tooltips for RDDs.
( Job page only ) Helper function to add tooltips for RDDs .
// to interpret line break, tooltipText is showing <circle> title // Link tooltips for all nodes that belong to the same RDD