mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 03:00:04 -03:30
Workflow node border tweaks and a small change to the workflow root in the details view.
This commit is contained in:
@@ -174,7 +174,20 @@ export default [ '$state','moment',
|
|||||||
|
|
||||||
nodeEnter.each(function(d) {
|
nodeEnter.each(function(d) {
|
||||||
let thisNode = d3.select(this);
|
let thisNode = d3.select(this);
|
||||||
if(d.isStartNode) {
|
if(d.isStartNode && scope.mode === 'details') {
|
||||||
|
// Overwrite the default root height and width and replace it with a small blue square
|
||||||
|
rootW = 25;
|
||||||
|
rootH = 25;
|
||||||
|
thisNode.append("rect")
|
||||||
|
.attr("width", rootW)
|
||||||
|
.attr("height", rootH)
|
||||||
|
.attr("y", 10)
|
||||||
|
.attr("rx", 5)
|
||||||
|
.attr("ry", 5)
|
||||||
|
.attr("fill", "#337ab7")
|
||||||
|
.attr("class", "WorkflowChart-rootNode");
|
||||||
|
}
|
||||||
|
else if(d.isStartNode && scope.mode !== 'details') {
|
||||||
thisNode.append("rect")
|
thisNode.append("rect")
|
||||||
.attr("width", rootW)
|
.attr("width", rootW)
|
||||||
.attr("height", rootH)
|
.attr("height", rootH)
|
||||||
@@ -190,7 +203,6 @@ export default [ '$state','moment',
|
|||||||
.attr("dy", ".35em")
|
.attr("dy", ".35em")
|
||||||
.attr("class", "WorkflowChart-startText")
|
.attr("class", "WorkflowChart-startText")
|
||||||
.text(function () { return "START"; })
|
.text(function () { return "START"; })
|
||||||
.attr("display", function() { return scope.mode === 'details' ? 'none' : null;})
|
|
||||||
.call(add_node);
|
.call(add_node);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -200,15 +212,15 @@ export default [ '$state','moment',
|
|||||||
.attr("rx", 5)
|
.attr("rx", 5)
|
||||||
.attr("ry", 5)
|
.attr("ry", 5)
|
||||||
.attr('stroke', function(d) {
|
.attr('stroke', function(d) {
|
||||||
if(d.edgeType) {
|
if(d.job && d.job.status) {
|
||||||
if(d.edgeType === "failure") {
|
if(d.job.status === "successful"){
|
||||||
return "#d9534f";
|
|
||||||
}
|
|
||||||
else if(d.edgeType === "success") {
|
|
||||||
return "#5cb85c";
|
return "#5cb85c";
|
||||||
}
|
}
|
||||||
else if(d.edgeType === "always"){
|
else if (d.job.status === "failed" || d.job.status === "error" || d.job.status === "cancelled") {
|
||||||
return "#337ab7";
|
return "#d9534f";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "#D7D7D7";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -593,15 +605,15 @@ export default [ '$state','moment',
|
|||||||
|
|
||||||
t.selectAll(".rect")
|
t.selectAll(".rect")
|
||||||
.attr('stroke', function(d) {
|
.attr('stroke', function(d) {
|
||||||
if(d.edgeType) {
|
if(d.job && d.job.status) {
|
||||||
if(d.edgeType === "failure") {
|
if(d.job.status === "successful"){
|
||||||
return "#d9534f";
|
|
||||||
}
|
|
||||||
else if(d.edgeType === "success") {
|
|
||||||
return "#5cb85c";
|
return "#5cb85c";
|
||||||
}
|
}
|
||||||
else if(d.edgeType === "always"){
|
else if (d.job.status === "failed" || d.job.status === "error" || d.job.status === "cancelled") {
|
||||||
return "#337ab7";
|
return "#d9534f";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "#D7D7D7";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user