Skip to content

Commit 438e3aa

Browse files
authored
fix(orchestrator):Add aborted as a result to WorkflowResult (#610)
Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>
1 parent 2ab77e3 commit 438e3aa

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-orchestrator': patch
3+
---
4+
5+
Add aborted as a result to WorkflowResult

workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowResult.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const useStyles = makeStyles(theme => ({
7474
const finalStates: ProcessInstanceStatusDTO[] = [
7575
ProcessInstanceStatusDTO.Error,
7676
ProcessInstanceStatusDTO.Completed,
77-
ProcessInstanceStatusDTO.Aborted,
77+
7878
ProcessInstanceStatusDTO.Suspended,
7979
];
8080

@@ -124,7 +124,15 @@ const ResultMessage = ({
124124
</Box>
125125
);
126126
} else if (!error && !resultMessage) {
127-
if (status && finalStates.includes(status)) {
127+
if (status === ProcessInstanceStatusDTO.Aborted) {
128+
statusComponent = (
129+
<Box sx={{ width: '100%' }}>
130+
<Alert severity="info">
131+
<AlertTitle> Run has aborted</AlertTitle>
132+
</Alert>
133+
</Box>
134+
);
135+
} else if (status && finalStates.includes(status)) {
128136
statusComponent = (
129137
<Box sx={{ width: '100%' }}>
130138
<Alert severity="success">

0 commit comments

Comments
 (0)