Skip to content

Commit 42b260d

Browse files
Copilotcschleiden
andcommitted
Add visual distinction for failed workflows in UI
- Modified WorkflowInstanceState component to accept error parameter - Updated Instance.tsx to pass error info from workflow history - Extended WorkflowInstanceTree to include error field - Updated tree building logic to detect errors in finished workflows - Failed workflows now display red "Failed" badge instead of green "Completed" Co-authored-by: cschleiden <[email protected]>
1 parent c5acff6 commit 42b260d

File tree

14 files changed

+30
-17
lines changed

14 files changed

+30
-17
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ web/app/node_modules
88
*.sqlite-shm
99
*.sqlite-wal
1010

11-
custom-gcl
11+
custom-gclsamples/web/web

diag/app/build/asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"files": {
33
"main.css": "./static/css/main.8b0db0ad.css",
4-
"main.js": "./static/js/main.1d3b50fb.js",
4+
"main.js": "./static/js/main.92464401.js",
55
"index.html": "./index.html",
66
"main.8b0db0ad.css.map": "./static/css/main.8b0db0ad.css.map",
7-
"main.1d3b50fb.js.map": "./static/js/main.1d3b50fb.js.map"
7+
"main.92464401.js.map": "./static/js/main.92464401.js.map"
88
},
99
"entrypoints": [
1010
"static/css/main.8b0db0ad.css",
11-
"static/js/main.1d3b50fb.js"
11+
"static/js/main.92464401.js"
1212
]
1313
}

diag/app/build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>go-workflows</title><script defer="defer" src="./static/js/main.1d3b50fb.js"></script><link href="./static/css/main.8b0db0ad.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>go-workflows</title><script defer="defer" src="./static/js/main.92464401.js"></script><link href="./static/css/main.8b0db0ad.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

diag/app/build/static/js/main.1d3b50fb.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

diag/app/build/static/js/main.92464401.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

diag/app/src/Components.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ export const WorkflowInstance: React.FC<{ instance: Instance }> = ({
7676
);
7777
};
7878

79-
export const WorkflowInstanceState: React.FC<{ state: number }> = ({
79+
export const WorkflowInstanceState: React.FC<{ state: number; error?: any }> = ({
8080
state,
81+
error,
8182
}) => {
8283
if (state === 0) {
8384
return <Badge bg="info">Active</Badge>;
@@ -87,6 +88,8 @@ export const WorkflowInstanceState: React.FC<{ state: number }> = ({
8788
ContinuedAsNew
8889
</Badge>
8990
);
91+
} else if (error) {
92+
return <Badge bg="danger">Failed</Badge>;
9093
} else {
9194
return <Badge bg="success">Completed</Badge>;
9295
}

diag/app/src/Instance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function Instance() {
103103

104104
<dt className="col-sm-4">State</dt>
105105
<dd className="col-sm-8">
106-
<WorkflowInstanceState state={instance.state} />
106+
<WorkflowInstanceState state={instance.state} error={wfError} />
107107
</dd>
108108

109109
<dt className="col-sm-4">Created at</dt>

diag/app/src/InstanceTree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const InstanceTree: React.FC<{
9494
{x.name}
9595
</Link>
9696
<br />
97-
<WorkflowInstanceState state={x.state} />
97+
<WorkflowInstanceState state={x.state} error={x.error} />
9898
</div>
9999
</foreignObject>
100100
</g>

0 commit comments

Comments
 (0)