diff --git a/frontend/src/__tests__/components/automations/detail/run-status-badge.test.tsx b/frontend/src/__tests__/components/automations/detail/run-status-badge.test.tsx index fdd62f91..735e66bc 100644 --- a/frontend/src/__tests__/components/automations/detail/run-status-badge.test.tsx +++ b/frontend/src/__tests__/components/automations/detail/run-status-badge.test.tsx @@ -16,6 +16,13 @@ describe("RunStatusBadge", () => { expect(screen.getByText("AUTOMATIONS$DETAIL$FAILED")).toBeInTheDocument(); }); + it("renders cancelled label for cancelled status", () => { + render(); + expect( + screen.getByText("AUTOMATIONS$DETAIL$CANCELLED"), + ).toBeInTheDocument(); + }); + it("renders pending label for pending status", () => { render(); expect(screen.getByText("AUTOMATIONS$DETAIL$PENDING")).toBeInTheDocument(); diff --git a/frontend/src/components/automations/detail/run-status-badge.tsx b/frontend/src/components/automations/detail/run-status-badge.tsx index 69300908..9c74e8cf 100644 --- a/frontend/src/components/automations/detail/run-status-badge.tsx +++ b/frontend/src/components/automations/detail/run-status-badge.tsx @@ -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", @@ -41,6 +45,7 @@ function StatusIcon({ status }: { status: AutomationRunStatus }) { case AutomationRunStatus.COMPLETED: return ; case AutomationRunStatus.FAILED: + case AutomationRunStatus.CANCELLED: return ; default: return ; diff --git a/frontend/src/i18n/translation.json b/frontend/src/i18n/translation.json index e54cfbab..f252f074 100644 --- a/frontend/src/i18n/translation.json +++ b/frontend/src/i18n/translation.json @@ -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": "保留中", diff --git a/frontend/src/types/automation.ts b/frontend/src/types/automation.ts index 583450a5..e50b0796 100644 --- a/frontend/src/types/automation.ts +++ b/frontend/src/types/automation.ts @@ -34,6 +34,7 @@ export enum AutomationRunStatus { RUNNING = "RUNNING", COMPLETED = "COMPLETED", FAILED = "FAILED", + CANCELLED = "CANCELLED", SKIPPED = "SKIPPED", }