Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ describe("RunStatusBadge", () => {
expect(screen.getByText("AUTOMATIONS$DETAIL$FAILED")).toBeInTheDocument();
});

it("renders cancelled label for cancelled status", () => {
render(<RunStatusBadge status={AutomationRunStatus.CANCELLED} />);
expect(
screen.getByText("AUTOMATIONS$DETAIL$CANCELLED"),
).toBeInTheDocument();
});

it("renders pending label for pending status", () => {
render(<RunStatusBadge status={AutomationRunStatus.PENDING} />);
expect(screen.getByText("AUTOMATIONS$DETAIL$PENDING")).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ const statusConfig: Record<
label: I18nKey.AUTOMATIONS$DETAIL$FAILED,
style: "border-status-fail-border bg-status-fail-bg text-status-fail-text",
},
[AutomationRunStatus.CANCELLED]: {
label: I18nKey.AUTOMATIONS$DETAIL$CANCELLED,
style: "border-border bg-surface-elevated text-content-muted",
},
[AutomationRunStatus.PENDING]: {
label: I18nKey.AUTOMATIONS$DETAIL$PENDING,
style: "border-border bg-surface-elevated text-content-muted",
Expand All @@ -41,6 +45,7 @@ function StatusIcon({ status }: { status: AutomationRunStatus }) {
case AutomationRunStatus.COMPLETED:
return <CheckCircleIcon className="size-3.5" />;
case AutomationRunStatus.FAILED:
case AutomationRunStatus.CANCELLED:
return <XCircleIcon className="size-3.5" />;
default:
return <ClockIcon className="size-3.5" />;
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,23 @@
"tr": "Başarısız",
"uk": "Невдало"
},
"AUTOMATIONS$DETAIL$CANCELLED": {
"en": "Cancelled",
"ja": "キャンセル",
"zh-CN": "已取消",
"zh-TW": "已取消",
"ko-KR": "취소됨",
"no": "Avbrutt",
"ar": "أُلغيت",
"de": "Abgebrochen",
"fr": "Annulé",
"it": "Annullato",
"pt": "Cancelado",
"es": "Cancelado",
"ca": "Cancel·lat",
"tr": "İptal edildi",
"uk": "Скасовано"
},
"AUTOMATIONS$DETAIL$PENDING": {
"en": "Pending",
"ja": "保留中",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types/automation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export enum AutomationRunStatus {
RUNNING = "RUNNING",
COMPLETED = "COMPLETED",
FAILED = "FAILED",
CANCELLED = "CANCELLED",
SKIPPED = "SKIPPED",
}

Expand Down