Skip to content

Commit

Permalink
Add link from jobs to stages
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Or committed May 3, 2015
1 parent deb48a0 commit 0706992
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ function renderViz(forJob) {
var div = d3.select(this);
var dot = div.select("div.dot-file").text();
var stageId = div.attr("name");
var container = svg.append("g").attr("id", "graph_" + stageId);
if (forJob) {
// TODO: handle attempts
var stageLink = "/stages/stage/?id=" + stageId.replace(/^stage/, "") + "&attempt=0";
var parentContainer = svg.append("a").attr("xlink:href", stageLink);
} else {
var parentContainer = svg;
}
var container = parentContainer.append("g").attr("id", "graph_" + stageId);
// No need to shift the first stage container
if (i > 0) {
// Move the container so it doesn't overlap with the existing ones
Expand Down Expand Up @@ -168,7 +175,7 @@ function renderDot(dot, container) {
/* Style the visualization we just rendered. */
function styleViz(forJob) {
d3.selectAll("svg g.cluster rect")
.style("fill", "none")
.style("fill", "white")
.style("stroke", VizConstants.rddScopeColor)
.style("stroke-width", "4px")
.style("stroke-opacity", "0.5");
Expand Down

0 comments on commit 0706992

Please sign in to comment.