Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI errors when workflow has been created but not started executing #375

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions diag/app/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"files": {
"main.css": "./static/css/main.8b0db0ad.css",
"main.js": "./static/js/main.fbd9a17e.js",
"main.js": "./static/js/main.e117a19e.js",
"index.html": "./index.html",
"main.8b0db0ad.css.map": "./static/css/main.8b0db0ad.css.map",
"main.fbd9a17e.js.map": "./static/js/main.fbd9a17e.js.map"
"main.e117a19e.js.map": "./static/js/main.e117a19e.js.map"
},
"entrypoints": [
"static/css/main.8b0db0ad.css",
"static/js/main.fbd9a17e.js"
"static/js/main.e117a19e.js"
]
}
2 changes: 1 addition & 1 deletion diag/app/build/index.html
Original file line number Diff line number Diff line change
@@ -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.fbd9a17e.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>
<!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.e117a19e.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>

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions diag/app/build/static/js/main.e117a19e.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion diag/app/build/static/js/main.fbd9a17e.js.map

This file was deleted.

26 changes: 17 additions & 9 deletions diag/app/src/Instance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ function Instance() {
);
}

const startedEvent = instance.history.find(
const startedEvent = instance.history?.find(
(e) => e.type === "WorkflowExecutionStarted"
) as HistoryEvent<ExecutionStartedAttributes>;
) as HistoryEvent<ExecutionStartedAttributes> | undefined;

const workflowName = startedEvent.attributes.name;
const inputs = startedEvent.attributes.inputs;
const workflowName = startedEvent?.attributes.name;
const inputs = startedEvent?.attributes.inputs;

let wfResult: string | undefined;
let wfError: {} | undefined;
const finishedEvent = instance.history.find(
const finishedEvent = instance.history?.find(
(e) =>
e.type === "WorkflowExecutionFinished" ||
e.type === "WorkflowExecutionContinuedAsNew"
Expand All @@ -70,7 +70,7 @@ function Instance() {
<div>
<div className="d-flex align-items-center">
<h2>
Workflow: <code>{workflowName}</code>
Workflow: <code>{workflowName || <i>Pending</i>}</code>
</h2>
</div>

Expand Down Expand Up @@ -146,10 +146,18 @@ function Instance() {

<h2 className="mt-3">History</h2>
<Accordion alwaysOpen>
{instance.history.map((event, idx) => (
<Accordion.Item eventKey={`${idx}`} key={event.id}>
{instance.history?.map((event, idx) => (
<Accordion.Item
eventKey={`${idx}`}
key={event.id}
className={
event.schedule_event_id
? `schedule-event-${event.schedule_event_id}`
: ""
}
>
<Accordion.Header>
<h5 className="d-flex flex-grow-1 align-items-center pe-3">
<h5 className={"d-flex flex-grow-1 align-items-center pe-3"}>
<div className="text-secondary" style={{ width: "50px" }}>
#{event.sequence_id}
</div>
Expand Down
2 changes: 1 addition & 1 deletion diag/app/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface WorkflowInstanceRef {
}

export type WorkflowInstanceInfo = WorkflowInstanceRef & {
history: HistoryEvent<any>[];
history?: HistoryEvent<any>[];
};

export interface HistoryEvent<TAttributes> {
Expand Down
Loading