Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit fc15e8b

Browse files
committed
session flow not-visited node text color invisible
plus highlight the traversed path Fixes #902
1 parent fa203e2 commit fc15e8b

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

app/content/css/ui.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,13 +1510,12 @@ break {
15101510
}
15111511
#wskflowSVG[data-is-session-flow="true"] .edge-label:not(.edge-was-traversed) {
15121512
fill: var(--color-text-02) !important;
1513-
opacity: 0.6
1513+
opacity: 0.8
15141514
}
15151515
#wskflowSVG[data-is-session-flow="true"] .node.leaf[data-status="not-run"] rect,
15161516
#wskflowSVG[data-is-session-flow="true"] .node.leaf[data-status="not-run"] text {
15171517
/* deemphasize not-visited nodes in session flow */
1518-
fill: var(--color-ui-04) !important;
1519-
opacity: 0.6;
1518+
opacity: 0.8;
15201519
}
15211520
#wskflowSVG .node rect.atom {
15221521
/* wskflow node effect */
@@ -1564,15 +1563,29 @@ break {
15641563
#wskflowSVG .node rect, #wskflowSVG .node rect {
15651564
fill: var(--color-ui-05);
15661565
}
1566+
#wskflowSVG path[data-visited="true"] {
1567+
/* visited edges */
1568+
stroke: #2166ac !important;
1569+
stroke-width: 2;
1570+
marker-end: url(#edgeTraversedEnd);
1571+
}
1572+
#wskflowSVG path[data-visited="false"] {
1573+
/* not-visited edges */
1574+
stroke-dasharray: 1;
1575+
opacity: 0.8;
1576+
}
15671577
#wskflowSVG .node.leaf[data-status="success"] rect, #wskflowSVG .node.leaf.function[data-status="success"] rect {
1578+
/* visited nodes with success outcome */
15681579
fill: #2166ac !important;
15691580
stroke: var(--color-text-01) !important;
15701581
}
15711582
#wskflowSVG .node.leaf[data-status="failed"] rect, #wskflowSVG .node.leaf.function[data-status="failed"] rect {
1583+
/* visited nodes with failure outcome */
15721584
fill: var(--color-support-01) !important;
15731585
}
15741586
#wskflowSVG .node.leaf[data-status="success"] text:not(.edge-label), #wskflowSVG .node.leaf.function[data-status="success"] text:not(.edge-label),
15751587
#wskflowSVG .node.leaf[data-status="failed"] text:not(.edge-label), #wskflowSVG .node.leaf.function[data-status="failed"] text:not(.edge-label) {
1588+
/* visited node text for session flow */
15761589
fill: var(--color-ui-01) !important;
15771590
}
15781591
#wskflowSVG .node.leaf.function[data-status="success"] text,

app/plugins/modules/wskflow/lib/graph2doms.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ function graph2doms(JSONgraph, ifReuseContainer, activations){
162162

163163
arrowHead("end", "var(--color-text-02)")
164164
arrowHead("forwardingEnd", wfColor.Edges.forwarding)
165+
arrowHead("edgeTraversedEnd", "#2166ac")
165166
arrowHead("greenEnd", wfColorAct.active)
166167
arrowHead("trueEnd", wfColor.reOrCon.trueBranch)
167168
arrowHead("falseEnd", wfColor.reOrCon.falseBranch)
@@ -955,9 +956,21 @@ function graph2doms(JSONgraph, ifReuseContainer, activations){
955956
if(d.source.indexOf("__origin") >= 0 && d.target.indexOf("__terminus") >= 0){
956957
s += " forwardingLink";
957958
}
958-
//else if(d.)
959+
959960
return s;
960961
})
962+
.attr("data-visited", d => {
963+
// edge was visited?
964+
const sourceStatus = $('#' + d.source).attr('data-status'),
965+
sourceWasVisited = sourceStatus && sourceStatus !== 'not-run',
966+
targetStatus = $('#' + d.target).attr('data-status'),
967+
targetWasVisited = targetStatus && targetStatus !== 'not-run'
968+
if (sourceWasVisited && targetWasVisited) {
969+
return true
970+
} else if (activations) {
971+
return false
972+
}
973+
})
961974
.attr("source", function(d){return d.sourcePort})
962975
.style("stroke", function(d){
963976
if(activations){

0 commit comments

Comments
 (0)