Skip to content

Commit a1d9f86

Browse files
committed
Update diag UI
1 parent 1686320 commit a1d9f86

19 files changed

+91
-56
lines changed

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.cf32ac93.js",
4+
"main.js": "./static/js/main.b236aa1e.js",
55
"index.html": "./index.html",
66
"main.8b0db0ad.css.map": "./static/css/main.8b0db0ad.css.map",
7-
"main.cf32ac93.js.map": "./static/js/main.cf32ac93.js.map"
7+
"main.b236aa1e.js.map": "./static/js/main.b236aa1e.js.map"
88
},
99
"entrypoints": [
1010
"static/css/main.8b0db0ad.css",
11-
"static/js/main.cf32ac93.js"
11+
"static/js/main.b236aa1e.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.cf32ac93.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.b236aa1e.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.cf32ac93.js renamed to diag/app/build/static/js/main.b236aa1e.js

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.b236aa1e.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/build/static/js/main.cf32ac93.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

diag/app/src/Components.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,18 @@ export function decodePayloads(payload: { [key: string]: any }): any {
2020
r[key] = payload[key].map((p: any) => decodePayload(p));
2121
break;
2222

23+
case "error":
24+
r[key] = decodePayloads(payload[key]);
25+
break;
26+
2327
case "result":
2428
r[key] = decodePayload(payload[key]);
2529
break;
2630

31+
case "stacktrace":
32+
r[key] = ("" + payload[key]).replaceAll("\t", " ").split("\n");
33+
break;
34+
2735
default:
2836
r[key] = payload[key];
2937
}

diag/app/src/Instance.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function Instance() {
5555
const inputs = startedEvent.attributes.inputs;
5656

5757
let wfResult: string | undefined;
58-
let wfError: string | undefined;
58+
let wfError: {} | undefined;
5959
const finishedEvent = instance.history.find(
6060
(e) =>
6161
e.type === "WorkflowExecutionFinished" ||
@@ -127,7 +127,11 @@ function Instance() {
127127
<Card.Header as="h5">Result</Card.Header>
128128
<Card.Body>
129129
{wfResult && <Payload payloads={[decodePayload(wfResult)]} />}
130-
{wfError && <Payload payloads={[wfError]} />}
130+
{wfError && (
131+
<Payload
132+
payloads={[JSON.stringify(decodePayloads(wfError), undefined, 2)]}
133+
/>
134+
)}
131135
</Card.Body>
132136
</Card>
133137

internal/command/complete_workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (c *CompleteWorkflowCommand) Execute(clock clock.Clock) *CommandResult {
6565
// Send completion message back to parent workflow instance
6666
var historyEvent *history.Event
6767

68-
if c.Error != nil { // TODO: Is this enough?
68+
if c.Error != nil {
6969
// Sub workflow failed
7070
historyEvent = history.NewPendingEvent(
7171
clock.Now(),

internal/sync/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ type Context interface {
104104
// Canceled is the error returned by Context.Err when the context is canceled.
105105
//
106106
//lint:ignore ST1012 for compat with "context" package
107-
var Canceled = errors.New("context canceled") // TODO: Need to make this a workflow.Error
107+
var Canceled = errors.New("context canceled")
108108

109109
// An emptyCtx is never canceled, has no values, and has no deadline. It is not
110110
// struct{}, since vars of this type must have distinct addresses.

0 commit comments

Comments
 (0)