Skip to content

Commit db692b7

Browse files
committed
Show cancelled icon in connections job list and list table
1 parent 3e17187 commit db692b7

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

airbyte-webapp/src/components/EntityTable/components/NameCell.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ const NameCell: React.FC<Props> = ({ value, enabled, status, icon, img }) => {
4646
? "inactive"
4747
: status === Status.PENDING
4848
? "loading"
49+
: status === Status.CANCELLED
50+
? "cancelled"
4951
: undefined,
5052
[status]
5153
);

airbyte-webapp/src/components/EntityTable/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ interface ITableDataItem {
3232
entityIcon?: string;
3333
}
3434

35-
enum Status {
35+
const enum Status {
3636
ACTIVE = "active",
3737
INACTIVE = "inactive",
3838
FAILED = "failed",
39+
CANCELLED = "cancelled",
3940
EMPTY = "empty",
4041
PENDING = "pending",
4142
}

airbyte-webapp/src/components/EntityTable/utils.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ export const getConnectionSyncStatus = (
119119
return ConnectionSyncStatus.ACTIVE;
120120

121121
case JobStatus.failed:
122-
case JobStatus.cancelled:
123122
return ConnectionSyncStatus.FAILED;
124123

124+
case JobStatus.cancelled:
125+
return ConnectionSyncStatus.CANCELLED;
126+
125127
case JobStatus.pending:
126128
case JobStatus.running:
127129
return ConnectionSyncStatus.PENDING;

airbyte-webapp/src/components/JobItem/components/MainInfo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ const MainInfo: React.FC<MainInfoProps> = ({ job, attempts = [], isOpen, onExpan
4444
const isPartialSuccess = partialSuccessCheck(attempts);
4545

4646
const statusIcon = useMemo(() => {
47-
if (jobStatus === JobStatus.cancelled || (!isPartialSuccess && isFailed)) {
47+
if (!isPartialSuccess && isFailed) {
4848
return <StatusIcon status="error" />;
49+
} else if (jobStatus === JobStatus.cancelled) {
50+
return <StatusIcon status="cancelled" />;
4951
} else if (jobStatus === JobStatus.running) {
5052
return <StatusIcon status="loading" />;
5153
} else if (jobStatus === JobStatus.succeeded) {

0 commit comments

Comments
 (0)