1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #269 from mabashian/4694-nodes-deleted-styling

Style nodes with deleted unified job templates
This commit is contained in:
Michael Abashian 2017-08-15 10:26:39 -04:00 committed by GitHub
commit e478b6a5ea
2 changed files with 16 additions and 9 deletions

View File

@ -97,7 +97,7 @@
.WorkflowChart-incompleteIcon {
color: @default-warning;
}
.WorkflowChart-incompleteText {
.WorkflowChart-deletedText {
width: 90px;
color: @default-interface-txt;
}
@ -139,3 +139,6 @@
border-top: 10px solid #707070;
margin: auto;
}
.WorkflowChart-dashedNode {
stroke-dasharray: 5,5;
}

View File

@ -283,7 +283,9 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge
})
.attr('stroke-width', "2px")
.attr("class", function(d) {
return d.placeholder ? "rect placeholder" : "rect";
let classString = d.placeholder ? "rect placeholder" : "rect";
classString += !d.unifiedJobTemplate ? " WorkflowChart-dashedNode" : "";
return classString;
});
thisNode.append("path")
@ -312,13 +314,13 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge
.style("display", function(d) { return (d.edgeConflict && !d.placeholder) ? null : "none"; });
thisNode.append("foreignObject")
.attr("x", 17)
.attr("x", 62)
.attr("y", 22)
.attr("dy", ".35em")
.attr("text-anchor", "middle")
.attr("class", "WorkflowChart-defaultText WorkflowChart-incompleteText")
.attr("class", "WorkflowChart-defaultText WorkflowChart-deletedText")
.html(function () {
return "<span class=\"WorkflowChart-incompleteIcon\">\uf06a</span><span> INCOMPLETE</span>";
return "<span>DELETED</span>";
})
.style("display", function(d) { return d.unifiedJobTemplate || d.placeholder ? "none" : null; });
@ -709,9 +711,11 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge
return "#D7D7D7";
}
})
.attr("class", function(d) {
return d.placeholder ? "rect placeholder" : "rect";
});
.attr("class", function(d) {
let classString = d.placeholder ? "rect placeholder" : "rect";
classString += !d.unifiedJobTemplate ? " WorkflowChart-dashedNode" : "";
return classString;
});
t.selectAll(".node")
.attr("parent", function(d){return d.parent ? d.parent.id : null;})
@ -788,7 +792,7 @@ export default ['$state','moment', '$timeout', '$window', '$filter', 'Rest', 'Ge
t.selectAll(".WorkflowChart-detailsLink")
.style("display", function(d){ return d.job && d.job.status && d.job.id ? null : "none"; });
t.selectAll(".WorkflowChart-incompleteText")
t.selectAll(".WorkflowChart-deletedText")
.style("display", function(d){ return d.unifiedJobTemplate || d.placeholder ? "none" : null; });
t.selectAll(".WorkflowChart-conflictText")